Questions tagged [ng-build]
223 questions
0
votes
0 answers
e.hostname is not a function Angular Production Build (OS Package)
I have facing against an issue provoked by an npm package which I previouly installed to get the hostname and ip address in my angular project, everything is ok in dev mode but when I build it to get the production files it doesn't work, I have…

Roman Badillo G
- 45
- 1
- 8
0
votes
2 answers
Angular CLI PWA - ngsw-config only caching images referenced in CSS
So this is a bit of a strange issue that I can't seem to find reference to anywhere online. Was hoping someone here could shed some light on the following, as well as a potential fix -
I have and Angular CLI application which is compliant with…

Rob Jeffrey
- 124
- 12
0
votes
1 answer
ng build —prod getting failed but able to run
I am new to Angular environment and creating a project using Bootstrap 4 + angular material. I am using "material.module.ts" to import-export all required material components.
When I am running the application with "ng serve" command, it is not…

Kishor Jacob
- 3
- 2
0
votes
0 answers
how many files should be there after ng build in dist folder
I have a angular 7 application, where i created multiple modules. Now when i build using ng build, it builds and creates js files inside the dist folder like
scripts.js
vendor.js and also for each module in the app it creates like the…
user11942791
0
votes
1 answer
Blank page when building Angular 8 project but works perfectly using "ng serve"
My project is working with "ng serve" command but shows just a blank screen when building. And this message is shown in the console:
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
No route is…

rostamiani
- 2,859
- 7
- 38
- 74
0
votes
0 answers
How to recover original source code from /dist for published angular library
I am using few in-house angular libraries, published on company's local npm repository. There is also a code base maintained, but i have noticed the latest code is not checked in for latest published version. (Bad set-up)
I am looking into…

capt.Nemo
- 1
- 1
0
votes
0 answers
Angular: Loading Site Results in Redirect Error
I've built my Angular project and sent dist folder to another computer. Then I've tried to run it following this answer.
I've got this:
but when going to the addresses specified or localhost it gives invalid redirect error and no page is…

Usr
- 2,628
- 10
- 51
- 91
0
votes
1 answer
How to use required function after ng build?
I'm using one file.json in asset's folder with my backend address
file.json
{
"api": "https://backend.com/api"
}
then by a function I get the value from json:
export const GET_API = function () {
return…

Jaison Pereira
- 3
- 1
0
votes
1 answer
Angular 7 CLI build: how to omit templates to be able to use MVC views?
I'm evaluating the lastest bits of Angular (7+) and CLI. I've done parts of the 'Tour of Heroes' tutorial. I can run 'ng build' to get the production bits.
However, an important requisite is the use of MVC views for component templates.
So instead…

NetWave
- 379
- 3
- 12
0
votes
2 answers
Angular 7 app deployment ng build does not understand --target or --environment
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…

Jamie
- 131
- 4
- 11
0
votes
2 answers
Angular build empty project
Create a simple project in angular7.
Its working fine with in development mode.
after completing, build through ng build --prod command.
Its generate dist folder with index.html with assets and some JS files
Check index file
If open in browers, its…

faisaljanjua
- 886
- 2
- 13
- 28
0
votes
1 answer
exclude view from Angular "ng build" process
When we hit "ng build" while doing Angular build by default it bundles HTML with JS and gives us one physical JS unit file.
Is there a option in "ng build" by which i can say do not bundle the view with the JS ?
some thing like
ng build --exclude…

Shivprasad Koirala
- 27,644
- 7
- 84
- 73
0
votes
0 answers
Angular 6 Library - Import module issue
I am building a library with 3 components, say A,B,C and generating a tgz file out of it. i am consuming this library in another angular application by doing npm install. Components A and B from the library work perfectly fine in the new application…

Girl Geek
- 79
- 1
- 7
0
votes
0 answers
ng build --prod on Azure FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
I'm deploying angular 7 app to Azure, it was working fine, but with the last commit, It gives the error
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
I have 2 GB RAM , What should I do?
I think it's due to…

Kenana Reda
- 430
- 1
- 9
- 24
0
votes
1 answer
Angular `ng build --prod` issue
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.
…

Hemanth
- 193
- 1
- 5
- 18