Microcontroleur Microcontroleur - 1 year ago 188
Node.js Question

NPM error (System.ComponentModel.Win32Exception) in Visual Studio 2015

I need to get started coding an Angular 2 application at my workplace but I get the following error in VS:

====Executing command 'npm install'====

System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at Microsoft.VisualStudioTools.Project.ProcessOutput..ctor(Process process, Redirector redirector)
Error executing npm - unable to start the npm process
Error - Cannot load global packages.

I've followed Angular 2 VS 2015 QuickStart guide, located here:

Prerequisites are all installed:

  1. VS 2015 with Update 3

  2. nodeJS v.6.9.1

  3. TypeScript v.

This error shows up in the output when I open the project or try to do a 'restore packages'

Answer Source

I finally found out the reason.. nodeJS was installed with the x86 installer on a x64 computer. Installed nodeJS in 64 bit and it resolved my issue.

Hope this help anyone who has this error.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download