Reputation: 2106
Trying to run the command npm run build on my system but keep getting this error. Tried uninstalling node but no luck. Any pointers would be helpful
Upvotes: 7
Views: 7978
Reputation: 86
Better late than never: I had a problem with a corrupt node js package downloaded by nvm. So I did the following to solve the problem:
%appdata%\nvm
%appdata%\nvm
nvm is simply changing symbolic links to the correct node version. So make sure you have the same folder pattern and structure as for a working version and it works like charm.
Upvotes: 0
Reputation: 23
I was also using nvm. My problem was that the version was not properly being used.
Normally when running nvm list
there is an asterisk (*) next to the current in-use version. But that was not the case (even after running nvm use x.x.x
)
I installed a second node version and uninstalled the first one and reinstalled it. After that I could switch and run npm install.
Upvotes: 1
Reputation: 12237
The issue for me was that I am using nvm, and for reasons I don't yet know, when I try to set my node version to 12.14.0, and then run nvm list, no versions are selected. I went back to 13.8.0 and nvm list showed that 13.8.0 was selected.
Long story short, make sure you have a selected node version.
Upvotes: 5
Reputation: 2081
you should follow one of two option:
Option 1 – Setup by running the .msi installation file
Option 2 – Setup by extracting .zip file
See the link below for more details : install Node.js and NPM on Windows 10
Upvotes: 0