6

Problem

Since some time we get an Error: NG02100 in our app. My problem is that I have no idea what is going and everything is working except one item in the navbar, but which has the identical code to the other components.

I tried checking the docs, but the error is not documented there. Did anybody else have this error and can help out?

We use these Angular packages in our app for reference:

"@angular/animations": "^13.2.1",
"@angular/common": "^13.2.1",
"@angular/compiler": "^13.2.1",
"@angular/core": "^13.2.1",
"@angular/forms": "^13.2.1",
"@angular/localize": "^13.2.1",
"@angular/platform-browser": "^13.2.1",
"@angular/platform-browser-dynamic": "^13.2.1",
"@angular/router": "^13.2.1",
"@angular/service-worker": "^13.2.1",
"@angular-devkit/architect": "^0.1302.2",
"@angular-devkit/build-angular": "^13.2.2",
"@angular-devkit/core": "^13.2.2",
"@angular-devkit/schematics": "^13.2.2",
"@angular-eslint/eslint-plugin": "~1.0.0",
"@angular-eslint/eslint-plugin-template": "~1.0.0",
"@angular-eslint/template-parser": "~1.0.0",
"@angular/cli": "^13.2.2",
"@angular/compiler-cli": "^13.2.1",
"@angular/language-service": "^13.2.1",
Gh05d
  • 7,923
  • 7
  • 33
  • 64
  • is this the ng02100 you have ? => error: ng02100: invalidpipeargument: 'unable to convert "invalid date" into a date' – jeremy-denis Jun 24 '22 at 10:13
  • No, I also found the post describing this error. Unfortunately, it only says _ERROR Error: NG02100_ – Gh05d Jun 24 '22 at 10:50

4 Answers4

2

Solution

Our problem was that a service returned an incorrect object which the component could not pass. That caused the error for us. So basically the component received undefined.

Gh05d
  • 7,923
  • 7
  • 33
  • 64
1

An NG02100 error might also be masking an NG0701 error which is a "missing locale data" error. You can confirm this using the Developer Tools of your browser, by putting a breakpoint in the transform call near the end of the stacktrace, and by running the offending line outside of its try block. If an NG0701 error is raised, try one of these solutions:

  • Either you forgot --localize in ng build --localize
  • or you can see this question for other solutions

If this doesn't help, take another look at all the steps taken in the Angular i18n docs.

Robin De Schepper
  • 4,942
  • 4
  • 35
  • 56
-1

I got this error when I used a number pipe on a string

{{someStr | number: '1.0-2'}} // Error: NG02100
Shmulinson
  • 361
  • 1
  • 4
  • 13