在将nodejs从10.x升级到12.x并显示以下消息后,我的Angular项目无法构建和启动:
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Missing binding C:\xxx\client\node_modules\node-sass\vendor\win32-x64-72\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 12.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 10.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.
我尝试使用npm rebuild node-sass
,但仍然无法正常工作。那是什么问题呢?
答案 0 :(得分:1)
您可以尝试以下操作:
npm i
卸载node-sass,然后重新安装。
npm uninstall node-sass
npm i node-sass