简体   繁体   English

angular:nodejs升级到12.x后项目启动失败

[英]angular: project failed to start after nodejs upgrade to 12.x

My Angular project failed to build and start after upgrading nodejs from 10.x to 12.x with the following message:在将 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.

I try the npm rebuild node-sass , but it still can't work.我尝试了npm rebuild node-sass ,但它仍然无法工作。 So what's the issue?那么问题是什么?

You can try these following things:您可以尝试以下方法:

  1. Removing node_modules and then npm i删除 node_modules 然后npm i
  2. uninstalling node-sass and then re-installing it.卸载 node-sass 然后重新安装它。

    npm uninstall node-sass npm i node-sass

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS Lambda 上 curl 请求的 NodeJS 12.x https 版本 - NodeJS 12.x https version of a curl request on AWS Lambda Lambda 函数 NodeJS 版本始终恢复为 12.x - Lambda Function NodeJS version always reverted to 12.x NodeJS 12.x:在 AWS Greengrass 中未找到错误 - NodeJS 12.x: Not found Error in AWS Greengrass AWS SAM 本地 start-api:设置 lambda nodejs 12.x 标志(例如 --experimental-modules)? - AWS SAM local start-api: Set lambda nodejs 12.x flags (e.g. --experimental-modules)? 将 NodeJS 运行时从 8.10 更新到 10.x 或 12.x - AWS Amplify - Update NodeJS runtime from 8.10 to 10.x or 12.x - AWS Amplify 使用 Selenium 的 AWS Lambda Nodejs 12.x:未找到 Chrome 驱动程序 - AWS Lambda Nodejs 12.x using Selenium: Chrome Driver not found AWS lambda html-pdf phantomjs“错误:在 NodeJS 12.x 上写入 EPIPE” - AWS lambda html-pdf phantomjs "Error: write EPIPE" on NodeJS 12.x Nodejs 无法为 Angular 项目编译 - Nodejs Failed to compile for Angular project 将 Lambda 运行时从 Node 8.x 更改为 Node 12.x 后,从 AWS API Gateway 随机获得 502 Bad Gateway 响应 - Randomly getting 502 Bad Gateway response from AWS API Gateway after changing Lambda runtime from Node 8.x to Node 12.x storybook 升级后无法启动 angular - storybook fails to start after upgrade angular
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM