[英]Angular8, Ng serve is very slow on my machine even for new/small projects
Ng serve is taking around 20 minutes to start the application on my machine even if I restart machine.即使我重新启动机器,Ng serve 也需要大约 20 分钟才能在我的机器上启动应用程序。
Node version - v12.13.0 Npm version - 6.9.0 Angular-Cli version - 8.0.2 Angular Version - 8节点版本 - v12.13.0 Npm 版本 - 6.9.0 Angular-Cli 版本 - 8.0.2 Angular 版本 - 8
System Configuration Windows : 10/ 64 Bit Ram : 8GB系统配置 Windows:10/ 64 位内存:8GB
This could be the issue with @angular-devkit/build-angular
I had exactly the same issue tonight... and I found one solution ....这可能是@angular-devkit/build-angular
的问题我今晚遇到了完全相同的问题......我找到了一个解决方案......
package.json/devDependencies : I downgraded from 0.11
package.json/devDependencies :我从0.11
降级
@angular-devkit/build-angular": "^0.6.8"
, @angular-devkit/build-angular": "^0.6.8"
,
and now it is fast (1.2 sec).... (without aot) then I tested 0.8.8 ... it is OK (1.2 sec) then I tested 0.10.7 ... slow for the first change (8 sec), then OK then I tested 0.12.0-beta.0 .. it is not OK (11 seconds at 1st, 2nd, 3rd change) so I go back to 0.10.7 ....现在它很快(1.2 秒)......(没有 aot)然后我测试了 0.8.8 ...它可以(1.2 秒)然后我测试了 0.10.7 ...第一次变化慢(8 秒) ),然后可以,然后我测试了 0.12.0-beta.0 .. 不正常(第 1、2、3 次更改为 11 秒)所以我回到 0.10.7 ....
For me, it is still ~50 seconds for ng serve .. but then a change is 1 second instead of 12 seconds with 0.11 (with --aot it is 157 seconds to serve and between 50 and 157 for a basic change)对我来说,ng serve 仍然是大约 50 秒..但是然后变化是 1 秒而不是 12 秒,0.11(使用 --aot 是 157 秒,基本变化在 50 到 157 秒之间)
My Config :我的配置:
Angular CLI: 8.0.1 Node: 12.13.0 OS: win32 x64 Angular: 8 Angular CLI:8.0.1 节点:12.13.0 操作系统:win32 x64 Angular:8
animations, cdk, cli, common, compiler, compiler-cli, core动画、cdk、cli、通用、编译器、编译器-cli、核心
forms, language-service, material, platform-browser表格、语言服务、材料、平台浏览器
platform-browser-dynamic, router平台浏览器动态,路由器
OR或者
Try removing node_modules
using尝试使用删除node_modules
rm -rf node_modules
and reinstalling them again并重新安装它们
npm i
OR npm install
npm i
或npm install
This may be the issue.这可能是问题所在。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.