ng-build

Error building with ng build --prod. Fine without --prod flag and ng serve

痴心易碎 提交于 2021-02-10 14:23:33
问题 I have a project that built fine with ng build --prod until I upgraded the version of TypeScript from 2.72 to 2.92 in my package.json. After upgrading, I now get the following error: ERROR in Cannot read property 'Symbol(Symbol.iterator)' of undefined However, the project builds fine using ng build and runs fine using ng serve so I have no idea where this problem is occurring and the error doesn't tell me where the problem is in my project. 回答1: I found the issue. Using resolveJsonModule

Call retries were exceeded exception while ng build

走远了吗. 提交于 2020-08-21 05:49:42
问题 I am facing an exception while ng build (generating ES5 bundles for differential loading...) An unhandled exception occured: Call retires were exceeded Used versions: Angular-CLI: 8.3.20 Angular: 8.2.7 Node: 12.12.1 Also in logs, it is mentioned [error] Error: Call retries were exceeded at ChildProcessWorker.initialize 回答1: Update 10.02.2019 This was a problem of the @angular/cli . Updating the version to >= 8.3.22 should fix the issue: see this comment in #16515 ORIGINAL Basically the build

ng build throws Cannot read property 'startTag' of null exception

坚强是说给别人听的谎言 提交于 2020-02-25 07:12:17
问题 I want to publish my Angular 8 app to IIS. Then I've started to follow the deployment instructions. When I build my project on prod mode with base-href, operation throws an error. If I build in development mode(just ng build), there is no error but I have to build in production mode. --base-href causes the error. What can I do now? Here is error: Cannot read property 'startTag' of null TypeError: Cannot read property 'startTag' of null at Object.augmentIndexHtml (D:\ReklamUssuProjects

Angular 7 app deployment ng build does not understand --target or --environment

落爺英雄遲暮 提交于 2020-01-06 06:32:13
问题 I am deploying an Angular app to Netlify. This app has deployed many times, and there have been no issues. Recently, while adding a new feature, I upgraded the app from Angular 5 to 7, and upgraded many dependencies. Now the build is failing with pretty minimal information. On Netlify, the build commands I use are: ng build --target=development --environment=staging for dev and ng build --target=production --environment=prod for prod. The log on Netlify is: 3:54:11 PM: Fetching cached

Angular `ng build --prod` issue

旧时模样 提交于 2019-12-25 01:44:50
问题 when i did --> 'ng build --prod' i got this error ERROR in : Cannot determine the module for class AppComponent in E:/GitNew/Terminal2/Terminal2/terminal2/src/app/app.component.ts! Add AppComponent to the NgModule to fix it. Cannot determine the module for class OfferCreationFinalForwarderComponent in E:/GitNew/Terminal2/Terminal2/terminal2/src/app/offer-creation-final- forwarder/offer-creation-final-forwarder.component.ts! Add OfferCreationFinalForwarderComponent to the NgModule to fix it.

How to host Angular application with Kestrel

南笙酒味 提交于 2019-12-20 04:46:18
问题 I am trying to deploy an Angular 7 application with .NET Core using Kestrel using the FileProvider extension. I have created the angular app , i have ng build it and i copied the files inside dist .NET Porject. Startup public void Configure(IApplicationBuilder app, IHostingEnvironment env) { string jsFolderName = "myroot"; string prodRoot =Path.Combine(AppDomain.CurrentDomain.BaseDirectory,jsFolderName); string debugRoot =Path.Combine(Directory.GetCurrentDirectory(),jsFolderName); var isDev

How to host Angular application with Kestrel

我的梦境 提交于 2019-12-20 04:46:07
问题 I am trying to deploy an Angular 7 application with .NET Core using Kestrel using the FileProvider extension. I have created the angular app , i have ng build it and i copied the files inside dist .NET Porject. Startup public void Configure(IApplicationBuilder app, IHostingEnvironment env) { string jsFolderName = "myroot"; string prodRoot =Path.Combine(AppDomain.CurrentDomain.BaseDirectory,jsFolderName); string debugRoot =Path.Combine(Directory.GetCurrentDirectory(),jsFolderName); var isDev

if im using lazy loading module my angular application main.bundle.js file size is decreased while build

人走茶凉 提交于 2019-12-11 15:16:23
问题 How can i reduce my vendor.bundle.js and main.bundle.js file size while build my application using ng build --aot false --prod if im using lazy loading module my angular application main.bundle.js file size is decreased while build. 回答1: ng build by itself does not have any optimizations. If you ng build --help you can see all the flags you can pass to further optimize your code and reduce the output sizes. Try ng build -prod -aot -vc -cc -dop --buildOptimizer and see what your numbers are.