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