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

nuxi init with npm is very slow #411

Closed
devhawk opened this issue May 14, 2024 · 5 comments
Closed

nuxi init with npm is very slow #411

devhawk opened this issue May 14, 2024 · 5 comments

Comments

@devhawk
Copy link

devhawk commented May 14, 2024

Creating a new nuxt app with nuxi using npm as package manager takes almost 6 minutes. Using pnpm takes 8 seconds, yarn 16 seconds, bun 4 seconds. I get that npm is slower than more modern package managers, but 20x slower seems longer than I would have expected

> npx nuxi@latest init arctic-demon

✔ Which package manager would you like to use?
npm
◐ Installing dependencies...                                                                                9:04:38 AM

> postinstall
> nuxt prepare

✔ Types generated in .nuxt                                                                                 9:10:29 AM
@shinGangan
Copy link
Contributor

Hi @devhawk , I tried it in my environment and couldn't observe it being that slow.

  • Node: v20.5.0
  • npm: v9.8.0

Is this problem still occurring?
If it is continuing, it would be a good idea to include environment information such as Node and npm versions.
You may be able to gather opinions from people in the same environment.

@devhawk
Copy link
Author

devhawk commented May 20, 2024

Just tried it again, still happening

node: v20.13.1
npm: v10.8.0
os: Debian 12 (via Windows Subsystem for Linux)

@devhawk
Copy link
Author

devhawk commented May 20, 2024

I tried installing Node v20.5 + which came with NPM 9.8 and the issue went away. took 23 seconds to install dependencies instead of almost 6 minutes

I also tried node v20.13.1 with npm v10.5.2. This one froze on the reify:@parcel/watcher-wasm step for several minutes (the later version of NPM doesn't appear to log current step to the console like this version does)

@shinGangan
Copy link
Contributor

@devhawk

Has this problem been resolved once?

This problem is most likely caused by the OS, Node, or npm rather than Nuxt CLI.
Therefore, if it is currently resolved, I think it is okay to close it.

If it happens again, please open it again.

@shinGangan
Copy link
Contributor

Sorry, @devhawk .

It would be helpful if you could close it when you have time 🙏

@devhawk devhawk closed this as completed May 21, 2024
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

2 participants