Questions about Angular version 11, the web framework from Google. Use this tag for Angular questions which are specific to only version 11. Use tag Angular for any Angular questions which are not specific to an individual version
Questions tagged [angular11]
700 questions
49
votes
8 answers
TypeError: Jest: a transform must export a `process` function
Recently upgrading my app to Angular 11. Jest has been set up as the default testing framework. Running npm test results in the following error:
● Test suite failed to run
TypeError: Jest: a transform must export a `process` function.
20…

user2031428
- 1,039
- 2
- 9
- 13
33
votes
2 answers
Angular language service in VSCode does not work because it is not an Angular project ('@angular/core/core.d.ts' could not be found)
Somehow the Angular (v11.0.4) language service in VSCode does not work anymore. I get the following error message.:
[Info - 17:52:04] Angular language server process ID: 147359
[Info - 17:52:04] Using typescript/lib/tsserverlibrary v4.0.5 from…

BuZZ-dEE
- 6,075
- 12
- 66
- 96
25
votes
2 answers
Angular 11 Unit Test Code Coverage is Now Breaking
Prior to upgrading to Angular 11, I ran my unit tests with code coverage via the following command:
ng test --project my-app --code-coverage true
When I upgraded my project to Angular 11, I was still able to do my code coverage tests, but I started…

user1100412
- 699
- 1
- 10
- 22
21
votes
5 answers
TypeError: angularCompiler.getNextProgram is not a function
I'm using angular 11.2 in my machine and I want to run a angular 12 project. After clone from git, I ran below commands.
npm install
ng serve
But I got below errors and can't run the project.
I read this question but it not worked for me.
Error:…

Thimira Pathirana
- 591
- 5
- 10
21
votes
11 answers
Angular 11 Inlining of fonts failed
Trying to build angular11 app in a system behind proxy. When running "ng build --prod" I get this error:
Inlining of fonts failed. An error has occurred while retrieving
https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap
over…

Ben
- 495
- 1
- 7
- 17
19
votes
8 answers
Why am I getting "no exported member" errors when attempting to upgrade Angular?
The issue
I am trying to upgrade from Angular V9 to V11 and I'm struggling quite a lot with the the following errors
Namespace node_module/@angular/core/core has no exported member ɵɵFactoryDeclaration
Namespace node_module/@angular/core/core has no…

Ruben Szekér
- 1,065
- 1
- 10
- 21
16
votes
4 answers
Trouble getting Angular Google Map AGM to work with Angular 11
I installed agm/core using npm like this:
npm install @agm/core
The following warnings were displayed:
npm WARN @agm/core@3.0.0-beta.0 requires a peer of @angular/common@^9.1.0 || ^10.0.0 but none is installed. You must install peer dependencies…

Glenster
- 1,187
- 2
- 13
- 31
14
votes
6 answers
ESLint - Only Allow Absolute Import Paths Not Relative
I'm working in an Angular 11 project. A lot of the imports in this project are using a relative path or an absolute path.
I have ESLint set-up for this project, I want to prevent relative import paths, and only allow absolute paths. But I'm not…

ineedtoknow
- 1,283
- 5
- 28
- 46
14
votes
0 answers
Error: The Angular Compiler requires TypeScript >=4.0.0 and <4.1.0 but 4.1.2 was found instead
While migrating and existing app to Angular 11, I'm facing the following error:
Error: The Angular Compiler requires TypeScript >=4.0.0 and <4.1.0 but 4.1.2 was found instead.
I'm not sure from where the 4.1.2 dependency is coming. Running the tsc…

Luis Abreu
- 4,008
- 9
- 34
- 63
11
votes
4 answers
Allocation failed - JavaScript heap out of memory in Angular 11 while ng serve
I have upgraded my Angular version from 5.2 to 11.2
And after upgrading Angular & all library when i start server (ng serve) getting Allocation failed - JavaScript heap out of memory
It also generates 1 file which has information, but i didn't…

Apurv Chaudhary
- 1,672
- 3
- 30
- 55
11
votes
4 answers
Angular 11: Why can't the compiler find 'GeolocationPosition' during compiling? "Cannot find name 'GeolocationPosition'"
Why does the angular compiler can't find GeolocationPosition and GeolocationPositionError? VSC doesn't give an error and only during compiling it gives me an error.
Error: src/app/modules/shared/services/position.service.ts:10:46 - error TS2304:…

fieldhof
- 155
- 1
- 10
11
votes
2 answers
Angular11 test: ReferenceError: ResizeObserver is not defined
I used ResizeObserver in my component and its works fine.
But get such error when running ut:
ReferenceError: ResizeObserver is not defined
133 | });
134 |
> 135 | this.resizeObserver = new…

FakeAlcohol
- 860
- 7
- 28
10
votes
1 answer
Browser sees old version of Angular app after new version is deployed, even after clearing cache
I have an Angular 11 app that I'm building for deployment in production with the following commands:
npm install
npm run build -- --prod --outputHashing=all
The problem I am having is that, once deployed, when I go the app's URL with my browser, I…

Master_T
- 7,232
- 11
- 72
- 144
10
votes
1 answer
Where to initialise a FormGroup in Reactive forms?
Using Angular 11 with Typescript 4 in Strict Mode I have:
export class ContactComponent implements OnInit {
form: FormGroup;
constructor(private formBuilder: FormBuilder) { }
ngOnInit() {
this.form = this.formBuilder.group({
…

Miguel Moura
- 36,732
- 85
- 259
- 481
10
votes
1 answer
Error: 'ngb-tab' is not a known element. Angular 11
I am upgrading my application to angular 11 and facing issue with bootstrap tab
Error: 'ngb-tab' is not a known element:
If 'ngb-tab' is an Angular component, then verify that it is part of this module.
'ngb-tabset' is not a known element:
If…

Khizar Shujaat
- 441
- 1
- 5
- 19