When I run npm install
, I face the following error. I am not able to find the problem.
I need some help in finding this issue.
d:\\testing
For me on Windows 10 and Node 13, I had to uninstall Visual Studio and Build Tools, and uninstall Node 13. Then, I deleted npm and npm-cache from Roaming, before reinstalling Node 11.6 and choosing to install Chocolately. It worked for me thereafter.
Update:
A new package will do all of this for us now.
Make sure you have the sufficient permissions by running:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
then run:
npm install -g windows-build-tools
wait for it to install and then run:
window-build-tools
and everything should be in its finest order.
Old answer:
I just went through some of the same issues as you. I spun up a fresh installation of Windows 8.1 in Hyper-V, went through the installation process and jotted things down a long the way. It seems that you have all the necessary tools installed.
I think the only think you might be missing (not being entirely sure though) could be setting the msvs_version
-flag when running npm install
- so try seeing if this helps:
npm install --msvs_version=2013
Now that I've done all these notes I might as well put them here, so people that experience the same kind of problems might find some help.
My recipe on a freshly installed machine:
1) Install Node.js
2) Install git
Select "Use Git and optional Unix tools from the Windows Command Prompt
3) Upgrade npm to npm 3.x.x (optional step)
Even though you've just installed Node.js it doesn't necessarily mean you have npm in version 3.
npm install -g npm-windows-upgrade
in the command line interface.Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
in the command line interfacenpm-windows-upgrade
in the command line interfacenpm --version
and make sure it responds with something like 3.x.x
4) Install Python 2.7.x
Install for all users
- click next.Select to install in C:\Python27
- click next
Be sure to select Will be installed on local hard drive
in Add python.exe to Path
- click next
Finish up the installation
5) Install Visual Studio Express 2013 for Windows Desktop with Update 4
Even if you have another version of Visual Studio installed on your system do install this as well.
English
or some other available language and click Download
wdexpress_full.exe
and click "Next"Now run npm install --msvs_version=2013
and you should be able to reach the end without node-gyp throwing errors.
For me it was because I was running node 14. Try downdrading your node version to node 12. Its pretty easy to do if you are using NVM