欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

vue项目启动webpack打包sass报错

程序员文章站 2022-03-28 15:13:38
...

报错截图展示

vue项目启动webpack打包sass报错

报错代码提示

 ERROR  Failed to compile with 1 error
 error  in ./src/styles/index.scss

Syntax Error: Error: Missing binding C:\Users\Administrator\Desktop\xxx\xxx\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.

报错原因

Node Sass找不到适合您当前环境的绑定:Windows 64位,带有Node.js 14.x

解决方案

npm rebuild node-sass