Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 14.x

10 篇文章 0 订阅

因为最近升级了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 后,重新运行即可

所以遇到报错不要慌,先看提示,如果实在搞不定直接上网查,总能找到解决方法滴!

我的个人博客有空来坐坐

https://www.wangyanan.online

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值