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

access_time 8 months ago visibility2007 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

Want to publish your article on Kontext?

Learn more

Kontext Column

Created for everyone to publish data, programming and cloud related articles.
Follow three steps to create your columns.


Learn more arrow_forward

More from Kontext

local_offer Javascript

visibility 19
thumb_up 0
access_time 12 months ago

JSON is commonly used in modern applications for data storage and transfers. Pretty much all programming languages provide APIs to parse JSON. 

Bootstrap 4 Mega Full Width Dropdown Menu

local_offer HTML local_offer Javascript local_offer bootstrap

visibility 1706
thumb_up 1
access_time 6 months ago

On Kontext, a full width mega dropdown menu is implemented using Bootstrap 4. If you'd like to implement similar menus, please follow these steps.  The following code snippets work with Bootstrap 4.4.1. It should also work with other 4.x versions but I didn't test it.  The new CSS class ...

local_offer Javascript

visibility 403
thumb_up 0
access_time 11 years ago

前几天帮一个学弟写的,JavaScript版本的杨辉三角,其实和其他C、Java等等版本的都差不多。代码如下:

About column

About Xml Xhtml Xslt Dhtml Css Javascript

rss_feed Subscribe RSS