I've seen quite a few of these questions on SO, but none seem to solve or match the problem.
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x. The odd thing is, I don't have Node.js 6.x installed. From the command line, node -v gives me v5.10.1.
I'm the Angular4 Universal Asp.net core visual studio 2017 template straight out of the box.
I've tried
Reordering node in Web External toolsin Visual Studio
fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HL4JSD9SSV8E": An unhandled exception was thrown by the application. System.Exception: Call to Node module failed with error: Prerendering failed because of error: Error: Module build 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:
This usually happens because your environment has changed since running npm install
.
Run npm rebuild node-sass --force
to build the binding for your current environment.
at module.exports (D:\Projects\angular2\node_modules\node-sass\lib\binding.js:15:13)
at Object. (D:\Projects\angular2\node_modules\node-sass\lib\index.js:14:35)
Where have I gone wrong?
On Visual Studio 2017 (15.4.1) you should go to:
Then reorder the tools as seen below.
This worked for me.
Deleting node_modules
folder and re-installing npm modules using npm install
worked for me.
Visual Studio ships it's own version of Node embedded so that's why you see a mismatch. The TROUBLSHOOTING guide in the repo covers how to work around this https://github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md#using-node-sass-with-visual-studio-2015-task-runner
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With