Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 14.x
因为最近升级了node,所以运行Vue项目 npm run serve 的时候报如下错误:errorin ./node_modules/vue-loading-spinner/src/components/RotateSquare5.vue?vue&type=style&index=0&id=fa2cf838&lang=scss&scoped=true&am
·
因为最近升级了node,所以运行Vue项目 npm run serve 的时候报如下错误:
error in ./node_modules/vue-loading-spinner/src/components/RotateSquare5.vue?vue&type=style&index=0&id=fa2cf838&lang=scss&scoped=true&
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Missing binding /Users/xxx/node_modules/node-sass/vendor/darwin-x64-83/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 14.x
Found bindings for the following environments:
- OS X 64-bit with Node.js 11.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/xxx/node_modules/node-sass/lib/binding.js:15:13)
at Object.<anonymous> (/Users/xxx/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/Users/xxx/node_modules/sass-loader/lib/loader.js:3:14)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at loadLoader (/Users/xxx/node_modules/loader-runner/lib/loadLoader.js:18:17)
解决方法:
上面报错内容已提示,在终端输入
npm rebuild node-sass
或
npm i node-sass
下载 node-sass 后,重新运行即可
所以遇到报错不要慌,先看提示,如果实在搞不定直接上网查,总能找到解决方法滴!
我的个人博客
有空来坐坐
更多推荐
已为社区贡献16条内容
所有评论(0)