7,458 questions
0
votes
3
answers
170
views
+50
How to inject values from a .env file into Angular environment.ts files during development and prod builds?
I have an Angular 18 app and need to inject environment variable values from a .env file into my environment.ts file and environment.development.ts. I want the values available during development (ng ...
2
votes
2
answers
10k
views
ngx-bootstrap Module not found: Error: Can't resolve 'ngx-bootstrap/loader'
I'm using datepicker from [email protected] in an Angular 6.1.10 project.
I'm also loading a different locale (nlLocale).
In my feature module:
import { defineLocale, nlLocale, ...
2
votes
2
answers
13k
views
Not Able to Install Angular CLI using npm
I'm trying to install Angular CLI using the commandnpm install @angualr/[email protected] but I'm facing the below error (screenshot). I tried investigating about the error. It seems like there is some proxy ...
1
vote
0
answers
69
views
Nx build fails on Jenkins, but works fine everywhere else
I have an angular app which builds fine in all our dev environments. But, fails to run in jenkins every single time. The only difference is in Jenkins we run it inside a docker container.
npm install ...
0
votes
1
answer
9k
views
Set environment variables on command line with npm start command in my angular app
I want to set some of environment variable with npm start command some thing like npm start apiUrl=http://localhost:5000.
I want the values of these variables to set properties inside my environment....
3
votes
5
answers
27k
views
GET http://localhost:4200/ 404 (Not Found) after NG Serve [closed]
I have no idea what is happening here. It has worked for weeks without an issue and the application still works on my laptop, but as soon as I pull new changes to my desktop and try to run my app I ...
4
votes
0
answers
126
views
Long compile time in angular 20
After upgrading my angular project from 19.2.15 to 20.3.1
My project's compile time (ng build) when from 85.426 seconds to 453.679 seconds.
The resulted bundle size difference is minimal (different by ...
0
votes
0
answers
29
views
How to remove 'unsafe-eval' from CSP in legacy ASP.NET Core 3.1 MVC + Angular 12 project using MVC and JIT compilation?
I have a legacy project developed with ASP.NET Core 3.1 MVC and Angular 12 (originally it was Angular 5).
I need to set a Content Security Policy (CSP) for the website without using 'unsafe-val' to ...
1
vote
2
answers
62
views
Angular 17 R3Injector error not showing actual issues
I posted a similar question yesterday, but I am having an issue where I am upgrading an Angular project to 17 (same issue with 20.x) and it builds, but fails to run post ng serve and ng serve --...
7
votes
1
answer
11k
views
Angular Error on `ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points`
I've recently updated my Angular project from 8 to 9. It worked fine on my machine. I tried copying the files and assembling them on another device. While doing npm install I am getting the following ...
2
votes
1
answer
20k
views
This version of CLI is only compatible with Angular versions ^15.0.0, but Angular version 16.0.0 was found instead
any help for this message
i still migrate my angular project from 8.2 to 15 ( **version by version **)
but i still have this problem :
This version of CLI is only compatible with Angular versions ^15....
6
votes
3
answers
4k
views
Facing problem when I am trying to create new component or service folder using Angular Cli
Trying to create new component using Angular CLI
An unhandled exception occurred: Collection "@angular-eslint/schematics" cannot be resolved.
ng generate component components/search
When I ...
421
votes
5
answers
661k
views
Is there a compatibility list for Angular / Angular-CLI and Node.js?
I periodically run into the problem, having to spin up old Angular projects with deprecated dependencies of Angular.
Because I unsually run the latest Node.js version (at least lates LTS version) I ...
57
votes
6
answers
51k
views
Is there a way to specify angular version with the ng new command
I am creating a new Angular project and would like all the Angular dependencies to be from the stable 7th version. However, it seems that while running the ng new app command the Angular always ...
0
votes
0
answers
76
views
How to tell the angular cli to let tailwind apply style to svgs in my public folder
I am building a angular frontend (v20) with tailwind 4.
To keep my svgs separated from my UI code, I want to put them into a separate folder.
I found out that for angular to serve the resources to the ...
11
votes
1
answer
13k
views
'does not appear to be an NgModule class.' error after updating to Angular@15
I'm trying to update from Angular@13 to Angular@15. After doing so, I'm getting compile error that I completely don't understand.
'SharedModule' does not appear to be an NgModule class.
src/app/...
56
votes
21
answers
131k
views
Cannot find module @angular\cli\bin\ng
I'm getting into trouble with anngular-cli installation because it doesn't recognize the ng command in my git bash but it works in my cmd on Windows 7.
I looked for some issues on the web but I didn't ...
13
votes
8
answers
57k
views
Error: Cannot resolve type entity i10.BidiModule to symbol while building angular Lib project Angular 13
I am facing Error: Cannot resolve type entity i10.BidiModule to symbol while building angular Lib project. There are 2 other lib projects which are building fine. This new lib project works well ...
0
votes
0
answers
69
views
How to integrate MapLibre GL JS CSP version with Angular
I am trying to integrate MapLibre GL JS into a typescript based Angular app, but I have a strict CSP policy and need to use the alternative CSP version that is supplied in the npm package. The ...
3
votes
1
answer
126
views
Why `ng build` writes information to error log
When I run for example a production build ng build --configuration production, then angular writes some information to the error log:
- Generating browser application bundles (phase: setup)...
✔ ...
-1
votes
1
answer
45
views
How can I pull Angular application files from CDN?
After Angular builder has done its job, index.html already has JS and CSS files auto linked.
Like this:
<!doctype html>
<html lang="en" data-beasties-container>
<head>&...
1
vote
1
answer
719
views
I am stuck updating a dependency which is already up to date
I am trying to update Angular from 12 to 16.
I want to use the three.js library and it needs Angular/cli 16 at least to work.
So angular/cli is already up to 16 but angular has been updated to 13 so ...
0
votes
1
answer
470
views
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 ...
0
votes
0
answers
1k
views
ng command not working as expected in cmd
Whenever I enter an ng command prompt like "ng new " it redirects me to the ng.js file in the visual studio code and after I close it up and return back to the cmd, all i see is this:
I was ...
0
votes
1
answer
73
views
How can I overcome ng not found
I have used "npm install -g @angular/cli" to install the angular cli even though I have used the -g it is not installed globally and shows ng not found error constantly I have uninstalled ...