85 questions
0
votes
0
answers
62
views
Angular 21 Vitest, FakeTimers and RxJS debounceTime
I could successfully migrate my Angular 20/Jasmine/Karma app to Angula r21/Vitest
All my tests are running correctly, except the ones that use debounceTime from RxJS
As a workaround for now, ny unit ...
1
vote
0
answers
24
views
Angular-Cli: @defer on template is not working with @ngtools/webpack
my angular project doesn't have cli, rather we have implemented the build using @ngtools/webpack.
I am trying to use @defer in my template to lazyload one of the component. it's supposed to create a ...
1
vote
0
answers
46
views
New application created with ng generate application in Angular workspace result in schema error
When I try to create a new application in my workspace with the command ng generate application I get this error
Schematic input does not validate against the Schema: {"name":"my-app&...
0
votes
0
answers
314
views
High RAM Usage in Angular Build with Browser-ESBuild Script Optimization
I'm encountering a strange issue when switching my Angular build system from Webpack to ESBuild.
When using:
"builder": "@angular-devkit/build-angular:browser"
Everything works ...
0
votes
1
answer
154
views
Unable to upgrade properly Angular v15 | Throwing Error | Not able to generate yarn.lock file
I am following the Angular upgrade site and upgrading the MFE's from the same.
Once I run the command ng update @angular/core@15 @angular/cli@15 , it did update the version from v14 to v15 but couldn'...
1
vote
0
answers
97
views
Dynamic import of CommonJS yields different result between dev-server and production targets
My Angular 18 application is using the new Angular build system, utilising the "application" target for production builds, thus making my local "dev-server" target use vite.
...
2
votes
0
answers
183
views
How to make angular esbuild ng serve watch for Typescript project references with es-build?
Is there a way to make ng serve watch for Typescript project references with es-build?
(Or any arbitrary folder outside of the project root, for my case, in the node_modules folder).
Notes :
In may ...
1
vote
0
answers
37
views
For angular webpack based builders, how to config the `define` for tree shaking or compress in the built-in javaScriptOptimizerPlugin
For angular webpack based builders, how to config the define for tree sharking or compress in the built-in javaScriptOptimizerPlugin ?
async function optimizeWithEsbuild(content, name, options) {
...
1
vote
1
answer
283
views
URI malformed issue from @angular-devkit's dependency library Vite
I just created a new angular application (version - 17.3.9) using the ng new url-test-app command.
I start the application using npm start, and navigating to http://localhost:4200 works fine.
But if I ...
1
vote
1
answer
94
views
How to use advance javascript optimizations from angular cli >= v16 in webpack ( from @angular-devkit/build-optimizer)
We ve used @angular-devkit/build-optimizer link and @ngtools/webpack in our webpack build of angular app, until we bump script target from es5 to > es2020 and from typescript v4 to typescript v5, ...
1
vote
1
answer
822
views
Upgrading Angular 16 => 17 seeing "Cannot find module '@angular/build/package.json'"
I'm upgrading my app from Angular 16 => 17. Everything going fine, but when I do npm install and then ng serve I get an error:
An unhandled exception occurred: Cannot find module '@angular/build/...
0
votes
1
answer
233
views
Angular docker: can't read /.angular/cache
This is my Dockerfile:
# Stage 1: Build the Angular app
FROM node:18 AS builder
WORKDIR /app
# Copy package.json and package-lock.json to install dependencies
COPY package.json package-lock.json ./
...
3
votes
1
answer
1k
views
Why does this nx executor ignore its dependsOn setting?
tl;dr: I am trying to chain two nx targets using the dependsOn property, but it seems to be ignored.
In my project.json file, there are the following targets (among others):
build: executor = @...
2
votes
0
answers
97
views
Use Chrome Angular Dev Tools to target an Ifame Angular App
I have an Angular Application that I am developing, but the app only works when rendered in the iframe of another Angular website that I do not own. Since that top level site is in production mode the ...
2
votes
1
answer
195
views
Jest tests using @angular-devkit/schematics are throwing errors for the encoded data was not valid for encoding utf-8
On three different applications Angular are failing all test that use @angular-devkit/schematics. Two of the applications were passing fine on Angular 17.2.0 but failed after upgrading to 17.3.7. The ...
0
votes
2
answers
485
views
Preprocessing Angular templates before compiling
I'm trying to plug into the compile step and modify the AST to amend a data attribute to DOM elements (HTML templates).
This is to inject information into the DOM at compile time without modifying the ...
0
votes
0
answers
60
views
Angular11: fileReplacements stopped working after angular update
My team and I are updating the Angular version of our app. We were using version 10.2.3 and migrated to 11.2.19 in angular/cli
Before updating, our environments files were replaced by fileReplacements
...
1
vote
1
answer
2k
views
Angular 17.0.X update to 17.3.3 failing - issue with dependencies
We have an Angular app that we have upgraded to 17.0.X and now we want to get it running to the latest version as of the time of writing - 17.3.X. We have updated the dependencies but we are seeing ...
0
votes
1
answer
383
views
Trying to installing Angular version 15, when latest version installed is 17, throws warning for Unsupported engine
In my System Angular Version 17 was installed. I tried installing Angular 15. To achieve this I tried
npm uninstall -g @angular/cli. Angular is successfully uinstalled.
npm cache clean(this throws ...
0
votes
0
answers
52
views
Where to integrate code generation in dev-server command
We are using the dev-server command from @angular-devkit/build-angular to run our TypeScrpt/Angular application locally on a development server with live reloading. This works quite well - whenever a ...
0
votes
1
answer
121
views
Angular v10: how do i handle this overlay issue of p-calendar
Overlay going beyond viewport
how do i prevent overlay from exceeding the view port of the browser
overlay should be displayed entirely on screen from top to bottom
would appreciate your help and ...
0
votes
0
answers
342
views
Cannot Get Angular 17.1 Feature "ng test --no-browsers" To Work
I was told that starting in version 17.1 we could run our unit tests without a browser using "ng test --no-browsers" but I think I am doing something wrong because this only results in ...
3
votes
1
answer
2k
views
Merge build files into single one file in Angular 17
After the migration of Angular 17 to vite, I encountered a problem that it was not possible to merge all new files into one single file without changing the builder to the old one @angular-devkit/...
2
votes
0
answers
157
views
Angular 16, extend builders to perform custom task on compile
I have an Angular 16 app which I compile by ng build <project> --watch.
The app is served by external web server (caddy) hence the --watch.
So now when I edit any source file, the app is re-...
1
vote
0
answers
598
views
After Angular upgrade to 16 ng s throws error - Class extends value undefined
I have upgraded Angular from version 15 to 16
And also have upgraded all the dependency packages in my app to latest versions
After Npm i and on running ng serve it throws error as
An unhandled ...
0
votes
1
answer
699
views
Typing Errors in TypeScript for @types/node/ts4.8/test.d.ts:876-921
I'm encountering an issue with my TypeScript. I have an Angular 11 application, and when attempting to compile the code, I'm receiving a series of error messages referring to node_modules/@types/node/...
1
vote
0
answers
2k
views
How much RAM for angular build is fine?
We encountered an issue while building our Angular Apps, it consumes too much memory, about 8 gigs for average project. Before blaming AngularCLI, creating a ticket and asking for help, I just want to ...
0
votes
0
answers
1k
views
angular cannot find module @angular-devkit\core\node_modules\rxjs\dist\cjs\index.js
To run the program, we have a batch file called buildAndRun.bat that cleans Maven, then it installs Node and NPM in case they aren't already there. After this it runs ng build --configuration ...
2
votes
1
answer
602
views
Why is my stencil components library failing to generate a symbol that seems to be required when running a build with angular-devkit/build-angular
At Big Give we have a library of web components built using stencil and build-angular.
Last week we were trying to upgrade from stencil v2 to stencil v3, but we started getting errors as shown below ...
0
votes
1
answer
1k
views
NX Cannot find module '@angular-devkit/core'
After upgrading the NX version of my Angular app from 15.6.3 to 15.9.2.
Initially I got some failures which I solved by getting rid of angular.json and makings some changes to my libs' project.json to ...
0
votes
1
answer
165
views
Angular 15.1 - Infinite Loop on Change Detection when removing babel-polyfill
We had a an old babel-polyfill in our project. Now, when we remove it, Angular DevTools shows an infinite Change Detetction Loop with Source "Window.addEventListener:message".
Anyone has an ...
1
vote
0
answers
188
views
Problem with Angular Schematics Tree persisting in local file system before executing command
I'm using @angular-devkit/schematics to create a schematic for my NodeJS projects. The schematic is really simple. It just needs to add husky to the devDependencies of the project along with the ...
1
vote
0
answers
828
views
BUILD with @angular-devkit/build-angular:browser and SERVE with @angular-builders/custom-webpack:dev-server
I have an angular workspace with this structure:
├── projects
│ ├── lib-1
│ ├── lib-2
│ ├── lib-wrapper
│ .
│ .
│
└── src
├── app
├── assets
.
.
where I develop ...
0
votes
1
answer
795
views
Asp.net core and multiple angular apps
I'm trying to create an application with several spa applications. Project uses asp.net core 6, angular 14. I can run the project in development mode. But when I open the project in a browser (https://...
1
vote
1
answer
814
views
Version compatibility issue for dependency @angular-devkit/build-angular in angular
I have created an new angular project and npm install is working fine but I am getting below error during build:
C:\Users\212807091\Documents\GIT_Codebase\idm-gui\node_modules\@angular\cli\...
1
vote
2
answers
848
views
Packages installation failed from 14 to 15 without errors
I'm using yarn 3.3.0 as package manager. What weird is new yarn only support .yarnrc.yml instead of .yarnrc. But angular still try to find the old one. But it's no help removing .yarnrc
❯ ng update @...
0
votes
1
answer
5k
views
angular/compiler-cli peer dependencies
I've tried a lot to fix this problem, but I can't find any solution.
This is the error:
npm ERR! While resolving: @angular-devkit/[email protected]
npm ERR! Found: @angular/[email protected]
npm ...
1
vote
1
answer
502
views
Unable to navigate inside a Tree in angular devkit schematics
I want to create a CLI based on schematics to improve projects creation for my job and I want to scaffold an Angular Application AND an Angular Library in one command. So I tried to use ...
1
vote
1
answer
1k
views
Preloading strategy slow down when using with Angular universal app (SSR)
I am using lazy loading for modules. But when the user navigates to the lazy loaded module route, it takes a couple of seconds to load the module.
So I use a custom preloading strategy with 20 second ...
0
votes
1
answer
5k
views
How do I properly install @angular-devkit/build-angular with Angular 13?
I have these dev dependencies in my Angular 13 project
"devDependencies": {
"@angular-devkit/build-angular": "~13.2.5",
"@angular/cli": "~13.2.5&...
0
votes
0
answers
794
views
Can we implement Angular microfrontend using angular-devkit?
I have recently gained an interest in developing microfrontends using module-federation, and I have started converting an existing Angular 13 app to microfrontend. The issue that I'm facing is that ...
6
votes
0
answers
4k
views
How to get more verbose output from "ng test" configuration
In short, I am looking for a way to get more verbose output from ng test.
I am not looking for more test output, but more verbose feedback on the configuration.
I am trying to configure a project, and ...
2
votes
2
answers
1k
views
Webpack external module in microfrontend/ multirepos angular gives an error on build
I have created a Angular project to call the microfrontend from other running angular project. I have import the module in my app by using webpack.config.js.
It is working well locally but failed on ...
1
vote
1
answer
691
views
ng serve has no ouput
I recently cloned a repo onto a new machine and now I have run into some issues in getting my development server up and running. When I run ng serve, there is no output in the terminal as seen below.
...
0
votes
1
answer
1k
views
Angular version mismatch on ng serve
This version of CLI is only compatible with Angular versions ^13.0.0,
but Angular version 12.2.13 was found instead.
Please visit the link below to find instructions on how to update Angular.
https://...
6
votes
2
answers
10k
views
Basic angular app fails to run, Error module build failed : cannot find module ../@angular-devkit/src/babel/X
I am new to angular and was following the documentation to build a basic app.
Node - v14.7.3
npm - 7.22.0
Angular CLI: 12.2.4
OS: win32 x64
@angular-devkit/architect 0.1202.4
@angular-...
2
votes
1
answer
8k
views
Angular doesn't work for safari browser. promiseReactionJob Error
Please understand that it may be difficult to understand because of my poor English.
We made a new Angular project and confirmed that it is working properly when connecting with Safari.
But the ...
6
votes
3
answers
8k
views
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 ...
1
vote
0
answers
453
views
Error in ng serve command. ./ node module/@angular-devkit/build
node version 14.15.0 and angular version 12.0.5;
earlier it worked fine but after reinstallation of angular and nodejs it shows this error on ng serve command.
ERROR in ./src/assets/styles/style.scss (...
62
votes
2
answers
28k
views
Angular 12 CSS optimization inline event handler with Content Security Policy
After upgrading to Angular 12 my Content Security Policy blocks styles from loading correctly.
The Angular 12 devkit seems to add a new inline event handler to the CSS bundle reference in index.html, ...