Module build failed (from ./node_modules/sass-loader/dist/cjs.js)问题记录

常见问题:

  • vue项目中不同分支的包装的不一样,导致了在切换分支时遇到问题。
  • 还有在拉取新项目安装依赖包,最后dev或serve启动项目时出现错误。
	Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
	Error: Missing binding …\node_modules\node-sass\vendor\win32-x64-83\binding.node
	Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 14.x
	Found bindings for the following environments:
	Windows 64-bit with Node.js 12.x
	Syntax Error: ModuleError: Module Error (from ./node_modules/sass-loader/dist/cjs.js):
	Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (93)
	For more information on which environments are supported please see:
	https://github.com/sass/node-sass/releases/tag/v5.0.0

可能还会有其他的情况…这里只是简单列举经常遇见的2种。

问题原因:

  • 通常是使用npm install在网络不好的情况下丢包引起的
  • 或者是node-sass在运行后node环境发生了变化

解决方案:

  • 一般可以使用cnpm install或者yarn install安装依赖
  • npm rebuild node-sass或者cnpm install node-sass
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值