Questions tagged [angular-devkit]

61 questions
57
votes
2 answers

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, example below.
Alex Moss
  • 571
  • 1
  • 4
  • 5
16
votes
3 answers

Angular CLI custom builder

Angular CLI 6 introduced a new concept of builders (aka Architect Targets). There are a couple of prebuilt builders that come with @angular-devkit/build_angular, but unfortunately there is no documentation that explains how to create your own…
JeB
  • 11,653
  • 10
  • 58
  • 87
15
votes
1 answer

How to exclude node_modules from watchers files

When I do ng serve the log shows errors like this: Error from chokidar (/PATH_OF_MY_PROJECT/node_modules/ionicons/dist/ionicons/svg): Error: ENOSPC: System limit for number of file watchers reached, watch…
user3909865
  • 175
  • 1
  • 7
14
votes
8 answers

NPM-AUDIT find to high vulnerabilities. What am I supposed to do?

npm audit run on my project and got me this High Command Injection Dependency of @angular-devkit/build-angular [dev] Path @angular-devkit/build-angular > @ngtools/webpack > tree-kill More info …
Nemus
  • 1,322
  • 2
  • 23
  • 47
9
votes
2 answers

Bootstrap SCSS error after angular update

I have recently upgraded my project from angular version 7 to 8. But when I issue command npm start I am seeing a lot of warnings like the following related with Bootstrap. WARNING: You probably don't mean to use the color value gray in…
7
votes
2 answers

Angular Universal TTFB is very slow

When I run my application with angular universal, I am seeing huge difference in TTFB. ssr is taking more time than normal angular command. How to improve TTFB with angular universal server side rendering? npm run serve:ssr Performance tab: ng…
Keyul
  • 729
  • 1
  • 8
  • 20
6
votes
2 answers

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-devkit/build-angular 12.2.4 @angular-devkit/core …
oxalicacid
  • 63
  • 1
  • 4
5
votes
0 answers

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 I get very little feedback from the CLI when…
bnieland
  • 6,047
  • 4
  • 40
  • 66
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
4
votes
1 answer

ClassOptions Schema - Angular Schematics

In the @angular-devkit/schematics readme, I am confused on what the ClassOptions is doing. If you add the code to a project, it will show an error because this file does not exist. Thoughts on what this is used for + an example? import { strings }…
Tony Scialo
  • 5,457
  • 11
  • 35
  • 52
3
votes
2 answers

Electron: How to resolve CSS url in prod?

I want to run an Angular app with Electron based on this example on my Raspberry Pi. The app runs well on my PC with npm start but it cannot resolve assets on the Pi. The assets are defined in a theme.scss file in the src/…
didil
  • 693
  • 8
  • 22
3
votes
2 answers

How to call ng add from an external schematic

I need assistance in calling an ng add for an external angular schematic. (I'm trying to add ng-momentum: https://github.com/BottleRocketStudios/ng-momentum) I am trying to call "ng add ng-momentum" from a custom CLI, but I've run into issues where…
TrevorR
  • 31
  • 4
2
votes
2 answers

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 production build. When I run ng build it throws…
2
votes
1 answer

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 problem is that the project I'm working on doesn't…
yongha Shin
  • 31
  • 1
  • 4
2
votes
1 answer

TypeError: Cannot read property 'includes' of undefined at ModuleFederationPlugin.apply

I am trying to use Module Federation Plugin in my angular project, but I am getting this error - [error] TypeError: Cannot read property 'includes' of undefined at ModuleFederationPlugin.apply…
1
2 3 4 5