access_time 2 years ago languageEnglish
more_vert

Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 12.x

visibility 4,642 comment 0

After upgrading Visual Studio to 16.5.1, I encountered the following error in Task Runner Explorer:

***\Kontext.Web.Portals\node_modules\node-sass\lib\binding.js:15
      throw new Error(errors.missingBinary());
      ^

Error: Missing binding ***\Kontext.Web.Portals\node_modules\node-sass\vendor\win32-x64-72\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 12.x Found bindings for the following environments: - Windows 64-bit with Node.js 10.x This usually happens because your environment has changed since running `npm install`. Run `npm rebuild node-sass` to download the binding for your current environment.

To reproduce this error, I can also run the following command in PowerShell or Command Prompt under the context of the website folder:

node node_modules\gulp\bin\gulp.js --tasks-simple

Fix this error

To fix this error, I did the following:

  • Uninstalled node.js
  • Installed the latest LTS version (v12.16.1)
  • Deleted the node_modules folder in my website folder (Kontext.Web.Portals).
  • And then run the following command to reinstall all the dependent packages. 
npm install

To verify the fix

Run the command which Visual Studio is calling and it prints the following output:

PS ***\Kontext.Web.Portals> node node_modules\gulp\bin\gulp.js --tasks-simple
copy:font:material
copy:font:fontawesome
copy:font:summernote
copy:bootstrap
clean:js
clean:js:editor
clean:js:QRCode
clean:fonts:fontawsome
clean:fonts:summernote
clean:css
clean
compile:scss
min:css
min:js
min:js:editor
min:js:QRCode
min
build
default

In Visual Studio, Task Runner Explorer now also display correctly:


I can also run my frontend CSS/JavaScript build successfully. 

copyright This page is subject to Site terms.
Like this article?
Share on

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

Follow Kontext

Get our latest updates on LinkedIn.

Want to contribute on Kontext to help others?

Learn more

More from Kontext

visibility 27
thumb_up 0
access_time 3 years ago
visibility 88
thumb_up 0
access_time 6 months ago