Open stephenplusplus opened 10 years ago
I am on a MacBook Pro with a fast SSD, yet Yeoman consistently take 1-2 seconds just to show the welcome menu. I hope these performance patches get released soon and we can see if they make a difference.
? 'Allo Tim! What would you like to do? (Use arrow keys)
Run a generator
❯ Node Typescript
──────────────
Update your generators
Install a generator
Find some help
Clear global config
(Move up and down to reveal more choices)
Having same issue here where anything involving the yo
command takes unacceptablly long.
anyone got any ideas?
Windows 10 too
are there any updates here? for me, yo startup takes up to 10 seconds. this issue exist since we updated from 1.0 to 2.0.5...
yo 2.0.5 global installed mac book pro mojave with SSD
I'm in the same boat with Windows 10 and its taking 10sec. Globally installed, cleared out any other node modules I could live without (only 7 remain). I immediately thought the problem was completely down to the fact yeoman tries to search all locations for my generator, hence the 10 seconds. So I roughly threw yeoman into my CLI, hoping to avoid the "generator lookup" performance hit. It made a difference but not a massive difference. I went from 10seconds down to ~7sec.
Would it be helpful for me to post additional logs or metrics?
I also experienced minutes of delay after running yo. I did some debugging and found it was caused by running npm -g prefix
via spawnSync. (https://github.com/yeoman/environment/blob/da6411e978b833d4cbc710cb2b3f3dda965f66aa/lib/resolver.js#L216)
Then, I found this issue: https://npm.community/t/npm-version-takes-3-minutes-to-complete-when-run-in-child-process-and-behind-corporate-proxy/1658
After applying one of the workarounds mentioned there it was fixed: Set environment variable NO_UPDATE_NOTIFIER=1
This also works:
npm config set update-notifier false
I'm facing this issue on Windows 10 right now. Yeoman takes over 30 seconds to run my local generator, whereas my colleagues on a mac have it run in under a second. Any ideas what can be done to improve this? I have no need to look up external generators, I simply want to run my local one.
I did some more digging and this appears to be specific to running Yeoman inside WSL2 Unix instances on Windows 10. The same generator run from Powershell is fast, but when run inside WSL2 on Ubuntu takes over 40 seconds to start. This is with both my generator and a public one like Visual Studio Code's extension generator.
👍 Thanks a lot @cliffred for the workaround, npm config set update-notifier false
works like a charm.
❓ Does anybody know whether
yeoman
's side
or npm
's usage of npm-update-notifier
and thus has no fix from yeoman
's side, and the issue could be closed by the aforementioned workaround?📝 Notes
npm.community
does not exist anymore. But the issue is locatable at https://github.com/npm/npm/issues/20979
The ever-haunting issue with yo is the slow discovery of installed generators. I recall us getting it in check in the past, but has anyone else noticed it creeping up again?