Microcontroleur Microcontroleur - 2 days ago 5
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:
https://angular.io/docs/ts/latest/cookbook/visual-studio-2015.html

Prerequisites are all installed:


  1. VS 2015 with Update 3

  2. nodeJS v.6.9.1

  3. TypeScript v.2.0.6.0



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

Answer

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.

Comments