简体   繁体   中英

Node and npm too slow to start after install of macOS Mojave

Actually, before macOS Mojave, node/npm would start immediately, and then depending on the task would take their time (10-20 seconds to finish ng start ).

After upgrading to macOS Mojave, it takes 30-45 seconds to start the process, then 10-20 seconds to ng serve.

The only change was upgrading to macOS Mojave

Any ideas?

I was facing the same issue...

Again Issue was not just related to Angular or React project... All the nodejs based CLI got slower after macOS Mojave update.

I had nvm to manage my node version so install LTS again with nvm install --lts and npm start and ng start starts working normally ...

If you do not have nvm just remove nodejs and reinstall again

Try to reinstall node using node version manager. https://github.com/creationix/nvm

I had the same issue but with different programming languages. The issue appears for some network related things, eg slows down tests.

Could you please try the following:

  • ensure that localhost is present in /etc/hosts
  • add your mac hostname to /etc/hosts as "127.0.0.1 yourhostname"

By the end it should look like

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1 localhost
127.0.0.1 yourhostname

255.255.255.255 broadcasthost
::1             localhost

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM