Alexis Le Gal
Alexis Le Gal

Reputation: 337

Error when using npm with Visual Studio 2015

I'm trying to run an Angular2 project with Visual Studio 2015. The project perfectly work when I launch it with npm via the windows console command 'npm start'.

I tried to do the same thing using npm Task Runner for VS, but have this error:

ERROR in Missing binding C:\Projets\BONewArchi\WebPack\node_modules\node-sass\vendor\win32-ia32-47\binding.node

The browser also show the following message:

Missing binding C:\Projets\BONewArchi\WebPack\node_modules\node-sass\vendor\win32-ia32-47\binding.node
Node Sass could not find a binding for your current environment: Windows 32-bit with Node.js 5.x

Found bindings for the following environments:
  - Windows 64-bit with Node.js 4.x

How can I fix it?

EDIT: important precision: the project use a webpack

Upvotes: 0

Views: 131

Answers (2)

Brandon Parker
Brandon Parker

Reputation: 803

The version of Node/NPM that comes packaged with Visual Studio (which is what is running when you run your tasks from inside Visual Studio) is really old so the bindings are different from when you install via command line.

Using the Quick Launch Toolbar in the top right corner, type "External Web Tools" and a dialog will pop up. Create a new entry in here pointing to your global node path (likely in c:\Program Files\nodejs) and move it to the top of the list. Close Visual Studio, delete node_modules, then open the solution again.

If this doesn't work check to see what version of node and NPM you're running.

Upvotes: 1

Alexis Le Gal
Alexis Le Gal

Reputation: 337

I have delete everything in node_module then reinstall it with npm Task Runner, it works

Upvotes: 0

Related Questions