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

npm run dev 启动时,报了一大堆错误:
Node Sass could not find a binding for your current environment: Windows 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 (D:\vuejs\vue-admin-master\node_modules\node-sass\lib\binding.js:15:13)
    at Object. (D:\vuejs\vue-admin-master\node_modules\node-sass\lib\index.js:14:35)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object. (D:\vuejs\vue-admin-master\node_modules\sass-loader\lib\loader.js:3:14)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    @ .//vue-style-loader!.//css-loader!./~/vue-loader/lib/style-compiler?{"id":"data-v-37fa8aa7","scoped":false,"hasInli
    neConfig":true}!.//sass-loader/lib/loader.js!.//vue-loader/lib/selector.js?type=styles&index=0!./client/App.vue 4:14-3
    03 13:3-17:5 14:22-311
    @ ./client/App.vue
    @ ./client/app.js
    @ ./client/index.js
    @ multi ./build/dev-client ./client/index.js

使用 npm rebuild node-sass,然后在更新一下npm update

[email protected] install D:\vuejs\vue-admin-master\node_modules\wysiwyg.css\node_modules\node-sass
node scripts/install.js
node-sass build Binary found at D:\vuejs\vue-admin-master\node_modules\wysiwyg.css\node_modules\node-sass\vendor\win32-x
64-57\binding.node
[email protected] postinstall D:\vuejs\vue-admin-master\node_modules\wysiwyg.css\node_modules\node-sass
node scripts/build.js
Binary found at D:\vuejs\vue-admin-master\node_modules\wysiwyg.css\node_modules\node-sass\vendor\win32-x64-57\binding.no
de
Testing binary
Binary is fine
[email protected] install D:\vuejs\vue-admin-master\node_modules\node-sass
node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-57_binding.node
Download complete ] - :
Binary saved to D:\vuejs\vue-admin-master\node_modules\node-sass\vendor\win32-x64-57\binding.node
Caching binary to C:\Users\yxc\AppData\Roaming\npm-cache\node-sass\4.9.3\win32-x64-57_binding.node
[email protected] postinstall D:\vuejs\vue-admin-master\node_modules\node-sass
node scripts/build.js
Binary found at D:\vuejs\vue-admin-master\node_modules\node-sass\vendor\win32-x64-57\binding.node
Testing binary
Binary is fine
[email protected] D:\vuejs\vue-admin-master\node_modules\wysiwyg.css\node_modules\node-sass
[email protected] D:\vuejs\vue-admin-master\node_modules\node-sass

npm run dev就好了

你可能感兴趣的:(Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 8.x)