Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: Missing binding D:\www\xxx\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
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.
这是几年前的项目,我的机子安的是nodejs v14.16.1,遇到这种情况,要么安装nodejs12的版本
要么可以npm uninstall sass-loader和npm uninstall node-sass,在安装npm install sass-loader 和node-sass
原因是sass-loader的版本问题,只适应相对的nodejs
注意安装最新的很有可能报错,起不来项目需要指定node-sass和sass-loader版本
目前我这边的项目用
cnpm i node-sass@4.14.1 cnpm i sass-loader@7.3.1 --save-dev
如果你nodejs是其他版本,可能还会有变化