I was having an issue after installing typescript globally using npm install -g typescript where it wouldn't recognize tsc as a command. After checking npm config get prefix, it showed that the files were being placed in /Users/MyName/.node_modules_global.
npm install -g typescript
npm config get prefix
I used npm config set prefix /usr/local to set it to the correct prefix and tried installing typescript globally again and it now works perfectly. My question now is: is .node_modules_global useless? Can I delete it without any issues?
config set prefix /usr/local
System: MacOS Catalina 10.15.7
Thank you!
1.4m articles
1.4m replys
5 comments
56.9k users