本文介绍了节点Sass无法为您的当前环境找到绑定:Windows 64位和Node.js 6.x的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行 gulp 时出现以下错误消息:

为以下环境找到绑定: Linux 64位与Node.js 7.x



为了解决这个错误,我试过了:


  1. npm install node-sass

  2. npm重建node-sass,

  3. npm uninstall -save node-sass


  4. npm cache clean。



  5. 为我工作。如何解决此问题。

    解决方案

    当您安装了2个节点版本时,会发生这种情况,运行它为另一个。



    示例Visual Studio附带节点5(至少VS2017)。如果你已经安装了另一个版本的节点(比如v6)并使用它来安装node-sass。当它安装时,它将版本绑定到版本6.然后,您可以永远不会通过Visual Studio(在节点5下)运行gulp,它会失败并返回错误。

    解决此问题您可以让Visual Studio使用您在系统上安装的版本。将列表顶部的条目添加到您的节点位置:


    I get following error message when running gulp:

    Found bindings for the following Environments: Linux 64-bit with Node.js 7.x

    To resolve this error I tried:

    1. npm install node-sass,
    2. npm rebuild node-sass,
    3. npm uninstall -save node-sass,
    4. npm install -save node-sass,
    5. npm cache clean. etc

    Nothing is working for me. How do I resolve this issue.

    解决方案

    This happens when you have 2 versions of Node installed, add node-sass with one and run it for the other.

    Example Visual Studio ships with Node 5 (at least VS2017 does). If you have installed another version of node (say v6) and install node-sass using that. When it installs it binds to the version to version 6. You can then never run gulp via Visual studio (under Node 5) it fails with the error.

    To fix this you can make visual studio use the version you have installed on your system. Add the entry to top of the list to your node location:

    这篇关于节点Sass无法为您的当前环境找到绑定:Windows 64位和Node.js 6.x的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 23:17