Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: Registering worked.dev subdomain fails in "wrangler init" #4915

Closed
akseiya opened this issue Feb 3, 2024 · 2 comments · May be fixed by #6569
Closed

🐛 BUG: Registering worked.dev subdomain fails in "wrangler init" #4915

akseiya opened this issue Feb 3, 2024 · 2 comments · May be fixed by #6569
Labels
bug Something that isn't working c3 Relating to C3 (create-cloudflare) package wrangler Relating to the Wrangler CLI tool

Comments

@akseiya
Copy link

akseiya commented Feb 3, 2024

Which Cloudflare product(s) does this pertain to?

Wrangler core

What version(s) of the tool(s) are you using?

3.26.0

What version of Node are you using?

20.10.0

What operating system and version are you using?

PopOS (22 LTS)

Describe the Bug

Observed behavior

After authorising Wrangler to nuke my Cloudflare account, the following happens while running wrangler init in an interactive shell:

 ⛅️ wrangler 3.26.0
-------------------
Total Upload: 0.19 KiB / gzip: 0.16 KiB
▲ [WARNING] You need to register a workers.dev subdomain before publishing to workers.dev


? Would you like to register a workers.dev subdomain now?
🤖 Using fallback value in non-interactive context: yes

✘ [ERROR] This command cannot be run in a non-interactive context

Expected behavior

wrangler init finishes successfully, not lying to its dependencies that it's run non-interactively.

Steps to reproduce

npx wrangler init NAME in a clean directory, follow the instructions from API Tutorial

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

--- 2024-02-03T15:43:57.925Z debug
🪵  Writing logs to "/home/uriel/.config/.wrangler/logs/wrangler-2024-02-03_15-43-57_816.log"
---

--- 2024-02-03T15:43:57.925Z debug
Failed to load .env file ".env": Error: ENOENT: no such file or directory, open '.env'
    at Object.openSync (node:fs:581:18)
    at Object.readFileSync (node:fs:457:35)
    at tryLoadDotEnv (/home/uriel/.npm/_npx/32026684e21afda6/node_modules/wrangler/wrangler-dist/cli.js:124257:72)
    at loadDotEnv (/home/uriel/.npm/_npx/32026684e21afda6/node_modules/wrangler/wrangler-dist/cli.js:124266:12)
    at /home/uriel/.npm/_npx/32026684e21afda6/node_modules/wrangler/wrangler-dist/cli.js:162342:20
    at /home/uriel/.npm/_npx/32026684e21afda6/node_modules/wrangler/wrangler-dist/cli.js:131131:16
    at maybeAsyncResult (/home/uriel/.npm/_npx/32026684e21afda6/node_modules/wrangler/wrangler-dist/cli.js:129352:44)
    at /home/uriel/.npm/_npx/32026684e21afda6/node_modules/wrangler/wrangler-dist/cli.js:131130:14
    at /home/uriel/.npm/_npx/32026684e21afda6/node_modules/wrangler/wrangler-dist/cli.js:129339:22
    at Array.reduce (<anonymous>) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '.env'
}
---

--- 2024-02-03T15:43:57.931Z log
 ⛅️ wrangler 3.26.0
-------------------
---

--- 2024-02-03T15:43:58.114Z log
Using npm as package manager.
---

--- 2024-02-03T15:43:58.155Z warn
▲ [WARNING] The `init` command is no longer supported. Please use `npm create cloudflare\@2 -- trionficfd1` instead.

  The `init` command will be removed in a future version.


---

--- 2024-02-03T15:43:58.155Z log
Running `npm create cloudflare\@2 -- trionficfd1`...
---

--- 2024-02-03T15:44:48.760Z log

---

--- 2024-02-03T15:44:48.761Z error
✘ [ERROR] Command failed with exit code 1: npm create cloudflare@2 -- trionficfd1


---

--- 2024-02-03T15:44:48.762Z log
If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose
---

--- 2024-02-03T15:52:41.899Z debug
Sentry: Capturing exception Error: Command failed with exit code 1: npm create cloudflare@2 -- trionficfd1
---
@akseiya akseiya added the bug Something that isn't working label Feb 3, 2024
@petebacondarwin petebacondarwin added the wrangler Relating to the Wrangler CLI tool label Feb 5, 2024
@petebacondarwin
Copy link
Contributor

Perhaps we should add an option to set whether to create a workers.dev domain to the command line args?

@admah admah added the c3 Relating to C3 (create-cloudflare) package label Feb 8, 2024
@penalosa
Copy link
Contributor

Closing as duplicate of #4263

@penalosa penalosa closed this as not planned Won't fix, can't repro, duplicate, stale Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working c3 Relating to C3 (create-cloudflare) package wrangler Relating to the Wrangler CLI tool
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants