Questions tagged [ng-build]

223 questions
7
votes
2 answers

EBUSY: resource busy or locked, unlink

Sometimes when I try to launch the angular-cli command : ng build --app myApplication -w I get the following error : EBUSY: resource busy or locked, unlink 'C:\...\inline.bundle.js' Any idea to overcome this problem?
Brahim LAMJAGUAR
  • 1,254
  • 5
  • 19
  • 28
6
votes
2 answers

After ng build --prod, why am I getting errors in main.js:1 and polyfills.js:1, rather than in components that I created, How to undo this?

I wanted to deploy an almost finished Angular project and for deployment I executed ng build --prod. It created a dist which than I deployed to the server. All understood and Ok till here but now when I change stuff in the project and execute 'ng…
ARS
  • 63
  • 1
  • 5
6
votes
4 answers

Unknown option: '--target', Unknown option: '--environment'; while trying to build ng app in prod

Tried to build the angular app in prod mode, but unknown target and environment error found. Tried with below: ng build --target=production --base-href / ng build --target=production --environment=prod ng build --prod --env=prod I expected build…
6
votes
4 answers

on ng build --prod am gettng error,Property 'email' does not exist on type 'Object

declared loginObj in login.component.ts as below public loginObj: Object = { email:'', password:'' }; public registerObj: Object = { email:'', name:'', password:'' }; HTML
5
votes
2 answers

How to compress Angular 11 application prod files

I am working on an application I have made deployment of my application now the issue I am facing is some of my prod files taking too much time load here is the screenshot from my network tab. I have also tried --aot and optimizer command while…
Kamran Khan
  • 1,042
  • 10
  • 21
5
votes
3 answers

Mixed Content error after migrating from Angular 7 to 12

The stack: Angular 12 with .NET, running in a Docker container. Bundles are being built by @angular-devkit/build-angular:browser. Last working setup: The application ran previously on Angular 7, all the assets were indeed served over HTTPS. The…
Cosmic Luke
  • 53
  • 1
  • 4
5
votes
1 answer

object Object is not a PostCSS plugin - error while building nrwl library project

We have an nrwl-nx workspace library project (on Angular 8), under which we have 3-4 angular libraries. Its ng serve works fine, ng build my-lib used to work as well. However, on our build agent, recently we started getting below…
Paritosh
  • 11,144
  • 5
  • 56
  • 74
5
votes
3 answers

ng build : Workspace config file cannot be loaded

When I run the ng build command I receive following error, An unhandled exception occurred: Workspace config file cannot be loaded: C:...\angular\angular.json Invalid JSON character: "" at 0:0. See…
Aqeel Qureshi
  • 437
  • 1
  • 4
  • 10
5
votes
1 answer

Getting Cannot read property 'replace' of undefined while running ng build --prod

I am getting an error while running ng build--prod. And I also tried to run npm install but I am getting the same error on that also. ERROR in Module build failed: TypeError: Cannot read property 'replace' of undefined at…
Dheeraj Rijhwani
  • 351
  • 5
  • 18
5
votes
1 answer

Angular serve working, Angular build not updating files

I'm running a project with an Angular front-end and a Django back-end. Today when I changed some code in the templates the ng build didn't update. I have discovered that it neither updates template changes nor component changes. However, when I run…
Marcus Grass
  • 1,043
  • 2
  • 17
  • 38
4
votes
2 answers

ng build process don't exit and stay in terminal

After updating to Angular 15, my build process "build:project:prod": "ng build project --configuration prod --stats-json=true --single-bundle=true && npm run copyAssets" didn't exit after the build, so copyAssets don't even start. In a terminal, I…
E1dar
  • 575
  • 1
  • 7
  • 15
4
votes
5 answers

JavaScript heap out of memory on Azure build

I' m using aspnetboilerplate with Angular and .NET Core. When i try to deploy application on Azure it shows: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory This is my azure…
C1X
  • 665
  • 4
  • 14
  • 25
4
votes
1 answer

Angular X - How to change the path for the compiled JavaScript files in index.html

I'm using my Angular App inside an Iframe, and I want to be able to change the path for the javascript files inside index.html after doing a build (ng build). This is the command I use in order to build my Angular App: npm run env && ng build --aot…
Ron Yaari
  • 231
  • 3
  • 10
4
votes
1 answer

Angular - Can't resolve ALL Parameters for component ng build --prod

I was trying to build my angular app but it fails because of this error ERROR in : Can't resolve all parameters for SimpleLookupAddEditFormComponent in C:/Users/lastr/Source/Repos/SMATA/Code/ng/smata-ng/src/app/system- …
Gani Lastra
  • 245
  • 1
  • 14
3
votes
0 answers

How to reduce main.js bundle produced by Angular 15 with Angular Materials

I am building Angular app v15.x with using of Angular Material (alse v15.x) libs and my main struggle is, that my initial chunk is bigger then 500kb. This is size of production build with all optimizations and latest angular+material libs. I am…
Ondřej Michejda
  • 138
  • 1
  • 12
1
2
3
14 15