angular:在nodejs升级到12.x之后,项目无法启动

时间:2019-10-08 03:00:44

标签: node.js angular upgrade

在将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,但仍然无法正常工作。那是什么问题呢?

1 个答案:

答案 0 :(得分:1)

您可以尝试以下操作:

  1. 先删除node_modules,然后再npm i
  2. 卸载node-sass,然后重新安装。

    npm uninstall node-sass npm i node-sass