libsass bindings not found when using node-sass in nodejs

后端 未结 12 1329
名媛妹妹
名媛妹妹 2020-12-02 05:03

I want to use the node-sass module in my node.js v0.12 application to benefit from the performance of libsass.
I executed np

相关标签:
12条回答
  • 2020-12-02 05:32

    I solved this problem by updating my gcc from 4.4.x to 4.7.x

    0 讨论(0)
  • 2020-12-02 05:33

    I have solved this to create the right directory with the specified binding.node file. You can download the bindings from github

    https://github.com/sass/node-sass-binaries

    Look in the error message the path where it tries to find the binding. In my case:

    C:\Users\Martijn\Documents\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-x64-46

    So I create this map win32-x64-46 and copy the binding from github in.

    0 讨论(0)
  • 2020-12-02 05:38

    Combining the two answers above worked for me, plus additions:

    sudo npm uninstall --save gulp-sass
    npm install --save gulp-sass@2
    npm update
    npm rebuild node-sass
    
    0 讨论(0)
  • 2020-12-02 05:41

    This is the only solution that worked for me,

    sudo npm install -g n
    sudo n 0.12.7
    npm install node-sass@2
    sudo npm -g install node-gyp@3
    npm rebuild node-sass
    
    0 讨论(0)
  • 2020-12-02 05:41

    No need for sudo or re-installations. This has always worked for me:

    nvm use 0.12.2
    
    0 讨论(0)
  • 2020-12-02 05:43

    I fixed this issue by deleting the existing /node_modules folder and running npm update

    0 讨论(0)
提交回复
热议问题