Node Sass couldn't find a binding for your current environment

前端 未结 30 2610
说谎
说谎 2020-11-29 14:23

I am having issues building an app because node-sass keeps failing with the error.

ERROR in Missing binding /Users/warren/Sites/random-docs/my-cms/nod

30条回答
  •  抹茶落季
    2020-11-29 15:15

    node-sass node module uses darwin binary file which is dependent on the version of node. This issue occurs when the binary file is not downloaded or wrong binary file is downloaded.

    Reinstall node modules will download expected binary of node-sass:-

    For Mac users:

    rm -rf node_modules
    npm cache clean --force
    npm i
    npm rebuild node-sass --force
    

    For Windows users:

    rmdir node_modules
    npm cache clean --force
    npm i
    npm rebuild node-sass --force
    

    but for some users, you need to check your node version's compatibility with node-sass version. Make it compatible using below table and run above commands again to fix this issue.

    If issue is still not fixed, check node-sass supported environment's list:- https://github.com/sass/node-sass/releases/

提交回复
热议问题