Questions tagged [ng-build]
223 questions
566
votes
5 answers
WARNING in budgets, maximum exceeded for initial
When building my Angular 7 project with --prod, I receive a warning in budgets.
I have an Angular 7 project. I am trying to build it, but I keep getting the following warning:
WARNING in budgets, maximum exceeded for initial. Budget 2 MB was…

Masoud Bimmar
- 6,941
- 4
- 30
- 33
369
votes
19 answers
How to allow access outside localhost
How can I allow access outside the localhost at Angular2? I can navigate at localhost:3030/panel easily but I can not navigate when I write my IP such as 10.123.14.12:3030/panel/.
Could you please allow me how to fix it? I am not using npm (node…

Tonyukuk
- 5,745
- 7
- 35
- 63
75
votes
11 answers
Call retries were exceeded exception while ng build
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…

Savan Gadhiya
- 1,082
- 2
- 11
- 16
38
votes
7 answers
Angular 8 ng-build throwing MIME error with cordova
While executing ng build --prod --base-href ./ for building my cordova app, the final output throws an error as below.
Failed to load module script: The server responded with a non-JavaScript MIME type of "". Strict MIME type checking is enforced
…

Nidhin Joseph
- 9,981
- 4
- 26
- 48
38
votes
1 answer
Use process.env in Angular 5 environment
I try to build an Angular 5 application with the standard ng build --prod command, and I want to set the basic API-Url in the environment.prod.ts to a value dependent on my process.env variables.
This is my file:
export const environment = {
…

Freshchris
- 1,211
- 4
- 17
- 34
21
votes
5 answers
Improving production build time for Angular 7 application
My application takes a very long time to build for production using ng build --prod
Sometimes it even fails with
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Is there something I can do…

Daniel
- 10,641
- 12
- 47
- 85
18
votes
10 answers
TypeError: Cannot read property '_rawValidators' of null after Ng build
I am new to angular. I am dynamically rendering some fields into my reactive form. Everything works great when I am using ng serve with a mock request (i.e. rendering happens properly, no error in the console.log). As soon as I build the project…

Grayrigel
- 3,474
- 5
- 14
- 32
17
votes
3 answers
When running ng build, the index.html does nothing?
I have an Angular 5 project, and it works fine when running ng serve, but I want to send it to a designer to work on it further. After running ng build, opening the index.html results in a completely blank page.
Is there something else I need to…

Betzel11
- 559
- 2
- 6
- 12
17
votes
3 answers
Building angular application and putting on the server
I'm developing an angular6 application and I want to generate a build to test on my server, currently I use ng server and it runs working on my browser without generating any errors.
c:\Users\emiry\Desktop\Angular\Projects\StartingNewProject
when…

Emiry Mirella
- 567
- 1
- 7
- 21
17
votes
5 answers
how to deploy angular5 application to sub directory
My angular application is hosted in server in which the application url is http://xyz.domain.in (Example Url). Now I created sub directory inside it to host another application. But when i try to access the path like http://xyz.domain.in/subfolder ,…

Manush
- 1,852
- 7
- 26
- 39
15
votes
2 answers
Manually restarting `ng build --watch` or `ng serve`
When we use nodemon, for example, we can manually trigger a rebuild by typing rs to stdin and hitting return/enter.
I am wondering if there is a way to manually trigger a rebuild when using ng build --watch or ng serve. On occasion, these fail to…
user7898461
14
votes
2 answers
Angular 6, after ng build index.html gets errors in console
I'm facing a issue please help me to resolve this.
The issue is that when I do ng build in my CLI and go to the dist folder and run index.html file so the console get the errors of files path.
Failed to load resource:…

Zain Khan
- 1,644
- 5
- 31
- 67
14
votes
2 answers
ng build --prod is not generating vendor.bundle.js
I am using node version 8.9.4,
npm version 5.6.0 I have no clue why this is happening the
ng build --dev is generating vendor.bundle.js while ng build --prod is not generating vendor.bundle.js here is the screenshot
output with ng…

Vikas
- 11,859
- 7
- 45
- 69
11
votes
10 answers
ng : The term 'ng' is not recognized as the name of a cmdlet, function Visual Studio Code Terminal
In Visual Studio Code, when I am running command ng build, I am getting this error:
PS D:\Dashboard\Test1> ng build
ng : The term 'ng' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the…

R15
- 13,982
- 14
- 97
- 173
7
votes
6 answers
Angular 7 prod build i18n files not found
I am trying to deploy an Angular 7 app that uses ngx-translate and translated language files in the /dist/assets folder. I specified the correct base href in build. After deployment, I see everything loads, except the languages file which returns an…

npabs18
- 167
- 2
- 10