When I try to install something I get the following error:
C:\dev\AREPL-vscode>npm install npm@latest -g
npm ERR! Cannot read property 'resolve' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Almenon\AppData\Roaming\npm-cache\_logs\2020-02-09T23_41_41_273Z-debug.log
Whenever I try to install something
error
Install works
C:\dev\AREPL-vscode>npm --version
6.13.6
C:\dev\AREPL-vscode>node -v
v13.8.0
same error :(
It didn't work for:
npm info using [email protected]
npm info using [email protected]
npm info using [email protected]
npm info using [email protected]
Same Error:
npm ERR! Cannot read property 'resolve' of undefined
Same error here
Ubuntu 16.04.4 LTS
node v12.15.0
npm v6.13.4
$ npm install npm@latest -g
npm ERR! Cannot read property 'resolve' of undefined
node v11.5.0
does not have this issue.
Figured out the issue. When we upgraded to newer versions, there must have been changes in paths or something in NPM that don't get cleaned up. Just uninstalling and installing did NOT work. I had to uninstall then delete the nodejs folder. Then everything worked after I re-installed. I did this on 8 build agents that all had the same problem. They all worked.
To Fix:
Same error here:
Windows 10
node v12.16.1
npm v6.13.4
Most helpful comment
Figured out the issue. When we upgraded to newer versions, there must have been changes in paths or something in NPM that don't get cleaned up. Just uninstalling and installing did NOT work. I had to uninstall then delete the nodejs folder. Then everything worked after I re-installed. I did this on 8 build agents that all had the same problem. They all worked.
To Fix:
Same error here:
Windows 10
node v12.16.1
npm v6.13.4