Node Sass No Binding for your current environment

I have seen quite a few such questions on SO, but none of them can solve the problem. Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x. Honestly, I do not have Node.js 6.x. From the command line, node -v gives me v5.10.1.

I am the main Angular4 Universal Asp.net template for creating visual studio 2017 right out of the box.

I tried

  • npm rebuild node-sass --force
  • Reordering node in Web External Tools in Visual Studio

    fail: Microsoft.AspNetCore.Server.Kestrel [13] Connection identifier "0HL4JSD9SSV8E": An unhandled exception was thrown by the application. System.Exception: the node module call failed: error abort due to error: Error: module assembly failed: error: missing binding D: \ Projects \ angular2 \ node_modules \ node-sass \ vendor \ win32-x64-48 \ binding .node Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x

    Found bindings for the following environments:

    • Windows 64-bit with Node.js 5.x

    This usually happens because your environment has changed since you started npm install . Run npm rebuild node-sass --force to create a binding for your current environment. on module.exports (D: \ Projects \ angular2 \ node_modules \ node -sass \ lib \ binding.js: 15: 13) in the object. (D: \ Projects \ angular2 \ node_modules \ node-sass \ Lib \ index.js: 14:35)

Where am I wrong?

+5
source share
3 answers

Visual Studio sends an embedded version of Node, so you see a mismatch. The TROUBLSHOOTING guide in the repo covers how to get around this https://github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md#using-node-sass-with-visual-studio-2015-task-runner

+1
source

Removing the node_modules folder and reinstalling npm modules with npm install worked for me.

+1
source

In Visual Studio 2017 (15.4.1), you should go to:

  • Tools> Configuring External Tools> Projects and Solutions> Web Package Management> External Web Tools

Then reorder the tools as shown below.

External web tools

It worked for me.

+1
source

All Articles