I was upgrading my node and npm to versions 8 and 5 respectively, when I ran into a problem best described by Dan Herbert. At that point, I figured I'd do a clean install of both. I followed the steps in John Papa's post precisely and got Node 8.0.0 working fine, however, I'm still getting -bash: npm: command not found
when running npm -v
. In my case, curl -L ...
reports a successful install, but I do not see the installation files in the ~/.npm-packages
folder. I mean, I see that installer puts four folders inside, but the files that need to be there are replaced with empty npm
files. I also tried sudo curl -L ...
to no avail. Here is the command output:
curl -L ...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6255 100 6255 0 0 11024 0 --:--:-- --:--:-- --:--:-- 11031
tar=/usr/bin/tar
version:
bsdtar 2.8.3 - libarchive 2.8.3
install npm@latest
fetching: https://...
removed 1 package in 0.084s
/Users/kuzmicheff/.npm-packages/bin/npm -> /Users/kuzmicheff/.npm-
packages/lib/node_modules/npm/bin/npm-cli.js
added 1 package in 2.227s
It worked
I understand that I need the npm-cli.js
file to run npm
commands in Terminal, but it does not get installed. I already spent over ten hours yesterday and today trying to resolve this issue, but still no luck. What else would you recommend checking to get me back on track? Please help!
via Andre Kuzmicheff
No comments:
Post a Comment