`npm rebuild node-sass` to download the binding for your current environment.

MacBook-Pro-2:abl-app ada$ yarn develop -e test
yarn run v1.3.2
$ gulp develop -e test
/Users/ada/abl-app/node_modules/node-sass/lib/binding.js:15
      throw new Error(errors.missingBinary());
      ^

Error: Missing binding /Users/ada/abl-app/node_modules/node-sass/vendor/darwin-x64-57/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 8.x

Found bindings for the following environments:
  - Windows 64-bit with Node.js 8.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.
    at module.exports (/Users/ada/abl-app/node_modules/node-sass/lib/binding.js:15:13)
    at Object.<anonymous> (/Users/ada/abl-app/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/ada/abl-app/node_modules/gulp-sass/index.js:187:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

執行項目時一直報錯,懷疑時node-sass有問題,一直在重新yarn install
後來複製了其他項目的,還是不行。

最後試了試
解決方式:

  1. 使用: npm rebuild node-sass
  2. 然後再yarn dev就沒問題了
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章