Questions tagged [ng-build]
223 questions
2
votes
0 answers
Cant find the folder where the build is being generated
E:\Project1\gui> ng build --configuration=staging --output-path=\"artifacts\"
staging": { "fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.staging.ts"…

Sunitha
- 241
- 1
- 5
- 17
2
votes
1 answer
Angular 7 library html-template changes are not affected into application when concurrently running ng build --watch and ng serve
Angular 7 library html-template changes are not affected into Angular application when they are running concurrently in different cmd using "ng build library --watch" and "ng serve application".
So I first start library with watch flag on, then I…

Janne Harju
- 976
- 1
- 14
- 29
2
votes
1 answer
Remove unused flag-icon-css images from dist directory
Angular 7 app uses flag-icon-css.
ng build --prod creates dist directory that contains all flag icon images, even though I use only 5-7 images for now ( I will use more when the app grows ).
This adds a lot of unnecessary weight to the project.
On…

zeljko_a
- 3,725
- 1
- 22
- 23
2
votes
1 answer
ng build --prod dynamic variables get lost
i have a ngModule which uses ngx-socket-io, i removed the unnecessary imports and injections :) as you can see i have commented some code which works like charm only in development build of application, as soon as i build the app using --prod those…

Navid Kianfar
- 171
- 1
- 10
2
votes
0 answers
After ng build css background changed in angular 6.x
angular.json
in my login.component.ts
in my dist folder
in dist folder main.js some png setting code
angular-cli 6.2.6 node 8.9.0 ant-design
after ng build ... some pictures which are in assets/ now is in dist root folder and…

xiaochi
- 29
- 1
- 1
- 4
2
votes
0 answers
angular 6 production main.ts file size
hi i built my angular 6 app by :
ng build --prod --build-optimizer --stats-json
command and here is my result ..check this image:
my app have many component the main.ts file size is little high even if i use gzip user must download at least 1 meg …

devmrh
- 1,171
- 4
- 19
- 46
2
votes
1 answer
Typekit fonts CSS not loading after ng build in Angular 5 app
I have imported the type-kit fonts css to my sass, its working fine on the local but when I run ng build for creating dist and upload on server, its started giving 403 error on type-kit. Any suggestions why its happening on server ?

Ahmer Khan
- 747
- 1
- 10
- 31
2
votes
4 answers
How to get value of --env variable in Angular 5 server.ts?
Currently i have three environments and I am trying to get --env=prod value in my server.ts which in this case is prod
I am getting the right environment object in my angular app but issues getting it in my server.ts file which is necessary for…

mkamranhamid
- 583
- 4
- 18
2
votes
2 answers
ng build throws error: "Tried to find bootstrap code, but could not."
When trying to build my app with ng-build, I get the following error:
Tried to find bootstrap code, but could not. Specify either statically analyzable bootstrap code or pass in an entryModule to the plugins options.
My main file as specified in…

David Deutsch
- 17,443
- 4
- 47
- 54
2
votes
3 answers
ng build failed to execute 'replaceState' on 'History': A history state object with URL cannot be created in a document with origin 'null' and URL
I am using Google Chrome version 52 and I want to be able to run my application locally without a server by accessing index.html.
I am able to hit the landing page of my application. However, when I try to navigate to another page or click on any…

icedmilocode
- 95
- 1
- 2
- 15
1
vote
0 answers
Maven project error: [ERROR] Command execution failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 3 (Exit value: 3)
I've made sure I'm not behind a VPN, I've made sure I have the right versions of node.js, NPM and angular installed for this project but I am still getting an error.
Eclipse: Sept 2021
JDK 1.8
Node: 14.20
NPM: 6.14.17
Angular CLI: 9.1.15 (global…

Jas
- 11
- 1
1
vote
0 answers
style.js not generated in angular build
I'm using the following to run my app with node v14.17.4 & npm v6.14.14
"@angular/cdk": "^13.2.2",
"@angular/common": "~13.1.0",
"@angular/compiler": "~13.1.0",
"@angular/core": "~13.1.0",
"@angular/forms": "~13.1.0",
…

ayeshas7
- 81
- 5
1
vote
0 answers
Can I use the jenkins plugin "warnings ng" to parse warnings produced by "ng build"?
I am using a jenkinsfile to test and build an angular webapp. I am also using the Warnings Next Generation Plugin to show lint-warnings. But for actual build-warnings I still have to look inside the console-log.
--> Can I use the jenkins plugin…

wotanii
- 2,470
- 20
- 38
1
vote
1 answer
Windows cmd script stops after ng build?
I am trying to run ng build in a Windows cmd script. I can't seem to get the script to continue after the ng build command.
Example test.cmd (in an Angular project directory of course):
ng build
echo Done. > done.txt
I get the output from the ng…

ruttergod
- 167
- 9
1
vote
1 answer
Angular build process is commenting out PHP tags
I asking my first Angular-related question. Please bear with me if it has already been answered. Hopefully, you know the answer and have time to share it.
My current use case is the following:
After building the Angular app, the default page must…

asiby
- 3,229
- 29
- 32