Questions tagged [ng-build]

223 questions
0
votes
0 answers

I'm trying to host an Angular project on GitHub

I'm trying to host an Angular project on GitHub. I have a project called website.github.io, I made a gh-pages branch, then a dist file where only a part of my page is uploaded, and when I generate the link, the page does not appear, I used the…
0
votes
0 answers

@smithy/types build issue in angular

My angular application failed during the time of build. Below is the error that I am getting. ERROR in node_modules/@smithy/types/dist-types/ts3.4/extensions/checksum.d.ts:23:6 - error TS1337: An index signature parameter type cannot be a union…
0
votes
1 answer

Bootstrap javascript module behaving differently between ng serve and ng build

I have an angular application where I use the Bootstrap 5.3 Javascript module, correctly installed with npm i bootstrap and npm i @types/bootstrap (JQuery and Popper.js were automatically installed as well). While developing and using the…
Alberto
  • 1
  • 1
0
votes
0 answers

i have got an error on running the command ng build please rectify

Im getting the above error on ngbuild while deploying in firebase I tried removing the cdn imports from the index.html file. Checked the dependencies of angular. Check the 3rd party libraries and its versions. I am using angular16.
0
votes
0 answers

`ng build` stays in terminal using `--extra-webpack-config`

In package.json using below exits the terminal as expected. ng build --progress=false --configuration production Now, I want to instrument my code as well as exit terminal. However, using --extra-webpack-config in build the terminal is not…
Ips
  • 45
  • 2
  • 8
0
votes
1 answer

Generate a production build for angular without including any dependencies in the bundle

I am creating a new angular application and want to be able to load all project dependencies such as angular libraries, rxjs, moment-js, etc externally from a common location (CDN) in the production build. Is there a way to configure angular project…
Prasanth
  • 1
  • 3
0
votes
0 answers

Angular library of standalone components

I've been trying to create an Angular library of standalone components. I've generated a .tgz file using npm pack of the library, and I'm trying to use/import some of it's components into another Angular application. But when I do that, using the…
0
votes
2 answers

Is it possible to re-use the existing component in new project in angular?

I have one existing project ActivityManagement and I am making a new project SourceManagement. Now this component of Banner , footer and header I want to use it in my new project. How can I use them ? Also one thing, the old project…
0
votes
0 answers

Failed to execute 'replaceState' on 'History': A history state object with URL 'http:/#/' cannot be created

Wondering why I get this warning if I specify --host to my 'ng serve'. I ran node.exe --max_old_space_size=10240 .\node_modules\@angular\cli\bin\ng serve --configuration=my-dev --host shop.bmw.my.test And connecting to application as…
Balaji
  • 201
  • 2
  • 12
0
votes
1 answer

ng build --watch deletes the project directory inside dist

I have two libraries for my app: contact-us and about-us. Contact-us is perfectly linked to my app, but when I use the same approach to link about-us, I get some errors!. What I've done to link about-us: cd libraries/about-us/ npm run build cd…
user6781
  • 25
  • 4
0
votes
0 answers

Ineffective mark compact near heap limit allocation failed when "aot=true"

I am trying to make a build of my angular application on 1vCPU and 1GB memory machine, ]it worked fine at start but as project is getting bigger, it fails with the error "Javascript heap out of memory" But, when aot=false is set, it works…
Charmi
  • 15
  • 5
0
votes
0 answers

How to control the count of processes spawned by ng ng build --prod=true to avoid bitbucket pipeline from failing with 'Build' exceeded memory limit

I am doing a memory dump on the instance where ng build is triggered. I can show the time where number of processes are spawned by ng build. Is there way to control this number. total used free shared buff/cache …
0
votes
0 answers

How do I exclude a file from an Angular deployment

I am loading some data from a JSON file in my Angular (19.1) app using HTTP GET. urlDataFile = './assets/data.json'; data: any = null; constructor( private _http: HttpClient ) { this.loadData().subscribe((res) => { this.data…
Vihung
  • 12,947
  • 16
  • 64
  • 90
0
votes
0 answers

In angular, the size of my main.js file is 20mb and vendor.js file is 7mb, what could be the issue and how can I optimize my build?

Size of main.js = 20mb and size of vendor.js = 7.84mb, what could be the issue and how can I optimize my build? I tried using ng build --prod which gives error for version 15.2-15.3
0
votes
0 answers

Angular, cannot read properties of undefined (reading 'production')

I coded an angular app on windows 10, and published it as a npm package. And then I installed the app using npm command (npm install package-name), and tried to ng build, but an error occurred as node-modules did not exist in the project. The error…
kt.um
  • 1
  • 2