![]() ![]() Remove the old version of npm installed by Node.Once installed, close and open a new terminal shell. Npm install -g command uses the old version of npm (installed by Node), to globally install the latest version of npm at ~/.npm-global/. Globally installed the desired version of npm.If npm is not installed, then install it on the Mac with Node.js. ![]() Make sure (the old version of) npm is installed.For me, a working solution was a simple, five-step process. In my case, none of the previous answers worked. I followed the directions found on this Q&A, completely removing npm and node from my system and reinstalling them from scratch, and it also fails to update.Ĭlose the terminal, and then re-open the terminal and running: $ npm -v It displays no error, only 'updated 1 package'. For reasons unknown to me, I haven't been able to update to the latest version of npm on macOS (it works fine on Windows). ![]()
0 Comments
Leave a Reply. |