After upgrading to MacOS Monterey, I can no longer install anything with npm, npx or yarn

As I said, after upgrading to Monterey my MacBook Air M1 some days ago, I can no longer install anything with npm or similar.

The problem is that I get no errors but instead when I try to install some packages, the installation take forever and it doesn't actually never end, while before it used to take minutes to finish now after hours nothing happens.


I used brew to install node and yarn and they were functionally until the update.


I tried to remove and reinstall node and yarn several times but nothing ever changed.

I tried to clear and verify the cache but nothing happened.

I tried to install them via other ways, but the problem was the same.


It seems to be a problem with my internet connection, because with yarn I get a notice about some network errors. But after several tests I can assure that it's everything ok since other programs works fine.


The package I'm trying to install is Gatsby package:

  • npm i gatsby - It does not give me any errors and the installation progress doesn't move further till a certain point (which it seems to be random).
  • yarn add gatsby - The progress bar moves a little faster but sometimes it displays some network error communication, but it disappears after a short time.
  • npx gatsby new - (which is the command to create a new gatsby project) Worked the first time and then just stopped working.


I tried to install different packages but with each of it, it gives me the same problem.


I really don't know how to resolve this situation and I ask for your help.

Thanks in advance and sorry for my English.

MacBook Air 13″, macOS 12.0

Posted on Oct 29, 2021 1:27 AM

Reply

Similar questions

3 replies

Oct 30, 2021 8:38 AM in response to Dln_Brt

Hello Dln_Brt,


We'd like you to try starting your Mac in safe mode to see if the issue continues. Doing this step will allow your Mac to run certain checks and prevents software from automatically loading or opening. Here are the steps to do this: How to use safe mode on your Mac


Please note that it will take longer than normal for your computer to load. Also, your screen may flash and change colors. Do not be alarmed this is normal behavior when accessing safe mode.


Test if the issue continues. Let us know the results. We'd be happy to continue working together.


Thanks for using Apple Support Communities. Take care!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

After upgrading to MacOS Monterey, I can no longer install anything with npm, npx or yarn

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.