Questions tagged [ng-build]

223 questions
2
votes
0 answers

Angular Universal: ng build does not build server files

I recently added SSR to my Angular app with Angular Universal (with express as the server) and I'm having trouble updaing my build and deploy steps. I was using a dockerfile in which I was having a build step: ng build -c followed…
Vee6
  • 1,527
  • 3
  • 21
  • 40
2
votes
3 answers

Angular build - Index html generation failed. undefined:9:219187: property missing ':'

I have an Angular App that doesn't seem to build with the prod configuration. I get the following error: Index html generation failed. undefined:9:219187: property missing ':' npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR!…
Maxim
  • 227
  • 2
  • 14
2
votes
0 answers

How to debug `ng build`?

I am getting ERROR in Expected a pseudo-class or pseudo-element. error after running ng build with "optimization": true parameter. (If I disabled the optimization flag the build will pass but resulted with like 20mb large vendor.js file!) I had…
Jiahua Zhang
  • 511
  • 7
  • 19
2
votes
4 answers

angular 10: image url given from assets after `Ng build` is listing directly under `dist` folder and `dist->assets`

I found one scenario where images are getting listed directly under the dist folder after ng build. I have created a sample angular app. Below are the details. Even the image is there inside the assets folder. It is getting copied directly under…
Aji
  • 423
  • 8
  • 23
2
votes
0 answers

Angular 8 typescript file replacement error

I'm replacing html files with angular.js configurations, but if I need to replace a typescript file from component, it shows errors. I'm using angular 8. angular.js "production": { "fileReplacements": [ { "replace":…
Alejandro L.
  • 1,066
  • 5
  • 17
  • 38
2
votes
0 answers

Is it possible to display ng-build progress in percentage only?

I am using angular. I know I can see the progress of my build process by adding the --process flag to my ng build command. Is there anyway I can get a progress bar that shows only the percentage without logging what is being built? I would like to…
YulePale
  • 6,688
  • 16
  • 46
  • 95
2
votes
1 answer

Copy artifacts generated by ng build in outdir to another folder

I have an angular project. when we run ng build command the build artifacts are created in dist folder as we have set "outDir": "dist", in angular-cli.json. After this I have to manually copy these files from dist to Webcontent folder of java to…
Syed Abbas
  • 49
  • 1
  • 8
2
votes
1 answer

How to resolve the given error by Angular after production build(Subscription is not defined)?

I have a angular app that runs fine in ng build and served to my ASP.net core web server, but when i build the same application by ng build --prod command the project build successfully but when i serve my wwwroot folder in web server i am getting…
theburningfire
  • 481
  • 1
  • 4
  • 20
2
votes
0 answers

ng build - ERROR in scripts.XX.js from Terser "f" is redeclared

I am using Angular 6 to implement a frontend for an ASP NET web application. Regarding performance issues I wanted to reduce the size of the vendor.js file. Therefore I found a solution to build my Angular project with following command: ng build…
xAgainst
  • 31
  • 8
2
votes
0 answers

Cannot run ng build in Angular 8

When I am creating an angular application and to deploy it I need to run the ng build command, earlier I used the command - ng build and it worked all fine.But now whenever I run the command ng build it throws error- when I run just **ng…
2
votes
1 answer

Angular Production Build Could Not Find Plugin "proposal-numeric-separator"

When taking production build I am getting error like Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. Here I have attached my error screenshot. We have added "@babel/preset-env":…
Kavin Kumar Arumugam
  • 1,792
  • 3
  • 28
  • 47
2
votes
2 answers

ng build message "ERROR in Cannot read property 'toLowerCase' of undefined"

I am using an Azure DevOps YAML pipeline to build/deploy my Angular 9 application. The YAML contains a Powershell script to build it as follows - powershell: | $angularBuildConfiguration = "MyBuildConfig"; write-host "ng-build start"; …
TerrorBight
  • 334
  • 4
  • 23
2
votes
2 answers

Not allowed to load local resource -error on chrome, Angular app is not running after production build

I am having a problem with the deployment of an angular app. It does not occur on another machine if deployed. My app is not running and it shows the following error on Chrome: Not allowed to load local resource and in Mozilla: 'src' attribute of …
Tasnim Fabiha
  • 1,148
  • 1
  • 17
  • 31
2
votes
0 answers

How to inline all JS/CSS into html with `ng build --watch=true`

I'm building webview mobile application that requires inlining JS/CSS into single standalone output.html file. My app is based on Angular and for each new build I'm running ng-build && html-inline (ng build, html-inline) cli command which produces…
godblessstrawberry
  • 4,556
  • 2
  • 40
  • 58
2
votes
1 answer

ERROR in scrips.xxx.js from Terser Invalid assignment

I am on angular 7.2.13. After the command "ng build --prod" I get an error: $ ng build --prod Date: 2019-04-18T11:50:54.572Z Hash: 87e16a832fe7eaf96031 Time: 91438ms chunk {0} runtime.b57bf819d5bdce77f1c7.js (runtime) 1.41 kB [entry]…