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

Run Npx nuxt/nuxi init Error. can't init the nuxt3 project. #199

Closed
yangxu52 opened this issue Dec 26, 2022 · 7 comments
Closed

Run Npx nuxt/nuxi init Error. can't init the nuxt3 project. #199

yangxu52 opened this issue Dec 26, 2022 · 7 comments

Comments

@yangxu52
Copy link

run "npx nuxi init -t v3 nuxt-app" or "npx nuxt init" or "npx nuxi init" failed, any file be not created. Not network issue ,I try a lots of times(using/nouse proxy, change proxy node and use anthoer network environment)
show my commend and print
image

D:\123>npx nuxi init -t v3 nuxt-app
Nuxi 3.0.0

 ERROR  Failed to download template from registry: request to https://raw.githubusercontent.com/nuxt/starter/templates/templates/v3.json failed, reason: getaddrinfo ENOENT raw.githubusercontent.com                              10:47:24

  at /D:/dev/node/node_cache/_npx/a95e0f536cf9a537/node_modules/nuxi/dist/chunks/init.mjs:15133:11
  at processTicksAndRejections (node:internal/process/task_queues:96:5)
  at async downloadTemplate (/D:/dev/node/node_cache/_npx/a95e0f536cf9a537/node_modules/nuxi/dist/chunks/init.mjs:15132:20)
  at async Object.invoke (/D:/dev/node/node_cache/_npx/a95e0f536cf9a537/node_modules/nuxi/dist/chunks/init.mjs:15200:15)
  at async _main (/D:/dev/node/node_cache/_npx/a95e0f536cf9a537/node_modules/nuxi/dist/cli.mjs:50:20)
@mohsin
Copy link

mohsin commented Dec 28, 2022

Same. Except I got:

Failed to download template from registry: request to https://raw.githubusercontent.com/nuxt/starter/templates/templates/v3.json failed, reason: write EPROTO 8601909888:error:140943E8:SSL routines:ssl3_read_bytes:reason(1000):ssl/record/rec_layer_s3.c:1556:SSL alert number 0

@ColinRosati
Copy link

Out of curiosity what node version are you using?

@mohsin
Copy link

mohsin commented Jan 4, 2023

So I found the issue. This has to do with nuxi using raw.githubusercontentap.com as the default registry and for some reason it failed to load on my mac. I manually overwrote the /etc/hosts to point to githubusercontent's IP and ran the command again. It works fine now!

Copy link
Member

@mohsin Would you try npx nuxi@latest to ensure you're using the latest version? This should have been resolved - see https://github.com/nuxt/nuxt.js/issues/15101.

@mohsin
Copy link

mohsin commented Jan 4, 2023

@danielroe Yes, it does work without the hosts entry now. Perfect!

@yangxu52
Copy link
Author

yangxu52 commented Jan 8, 2023

Out of curiosity what node version are you using?

16.17.0

@coderwyd
Copy link

图片

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants