Repository navigation
Closed
Labels
area: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilerfreq2: mediumneeds reproductionThis issue needs a reproduction in order for the team to investigate furtherThis issue needs a reproduction in order for the team to investigate furthertype: bug/fix
Milestone
Description
🐞 bug report
Affected Package
Unknown.
Is this a regression?
Only happen when using Ivy.
Description
An unhandled exception occurs immediately, and my app does not load.
🔥 Exception or Error
core.js:30223 Uncaught TypeError: Cannot read property 'id' of undefined
at registerNgModuleType (core.js:30223)
at core.js:30241
at Array.forEach ()
at registerNgModuleType (core.js:30237)
at new NgModuleFactory$1 (core.js:30375)
at compileNgModuleFactory__POST_R3__ (core.js:34663)
at PlatformRef.bootstrapModule (core.js:34960)
at Module../src/main.ts (main.ts:11)
at __webpack_require__ (bootstrap:79)
at Object.0 (main.ts:11)
🌍 Your Environment
Angular Version:
Angular CLI: 8.1.0-beta.3
Node: 12.4.0
OS: darwin x64
Angular: 8.1.0-rc.0
... animations, common, compiler, compiler-cli, core, elements
... forms, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.801.0-beta.3
@angular-devkit/build-angular 0.801.0-beta.3
@angular-devkit/build-optimizer 0.801.0-beta.3
@angular-devkit/build-webpack 0.801.0-beta.3
@angular-devkit/core 8.1.0-beta.3
@angular-devkit/schematics 8.1.0-beta.3
@angular/cli 8.1.0-beta.3
@ngtools/json-schema 1.1.0
@ngtools/webpack 8.1.0-beta.3
@schematics/angular 8.1.0-beta.3
@schematics/update 0.801.0-beta.3
ng-packagr 5.3.0
rxjs 6.5.2
typescript 3.4.5
webpack 4.35.0
Reacted by Adrien Dessilly, luckynick, jaa1982, Matt Richard, Yannick Beauchamp-H, Rezon Jovian, Ismael Ramos, Minchul Joh, Vincent Lycoops and niojihye
Reacted by Eric Martinez
Metadata
Metadata
Assignees
Labels
area: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilerfreq2: mediumneeds reproductionThis issue needs a reproduction in order for the team to investigate furtherThis issue needs a reproduction in order for the team to investigate furthertype: bug/fix
Activity
AndrewKushnir commentedon Jun 27, 2019
@fr0, could you please provide some additional information on how to reproduce this issue? It'd be helpful if you could create a repro using https://stackblitz.com/, so we can investigate the problem. Thank you.
bennadel commentedon Jun 28, 2019
I get the same error when I try to import the Animations module. I don't even attempt to use it -- this is just from the import:
I am currently using
"next", which installs8.1.0-rc.0. I also have Ivy enabled. I can't figure out how to enable Ivy in StackBlitz. There doesn't seem to be atsconfigfile.fr0 commentedon Jun 28, 2019
Removing
BrowserAnimationsModuledoes "fix" the problem for me as well.fr0 commentedon Jun 28, 2019
While trying to create a reproducible repo, I added back the
BrowserAnimationsModuleand now I'm getting a different (compile-time) error:I have no idea what I did wrong. I'll poke more at this Monday.
AndrewKushnir commentedon Jun 29, 2019
Thanks for additional information.
It looks like this issue is similar to the one described in #31348 and there is a fix that should resolve the issue: angular/angular-cli#14934, see comment from @alexzuza. The fix will most likely be included into the next CLI release.
alxhub commentedon Jul 2, 2019
Fixed by the commit mentioned above.
lwensveen commentedon Jul 10, 2019
Still get this issue with 8.2.0-next.0
Example:
node_modules/@angular/common/common.d.ts(115,22): error TS-996002: Appears in the NgModule.imports of CoreModule, but could not be resolved to an NgModule class~~hoangleitvn commentedon Jul 11, 2019
I faced this exception, then I have to turn off Ivy option to get detailed error
alexzuza commentedon Jul 16, 2019
@lwensveen Can you please provide a minimal reproducible example of your case?
14 remaining items
Splaktar commentedon Oct 15, 2019
@gkalpak @alexzuza I hit this as well in a non-CLI project. Here's a branch with the repo: https://github.com/DevIntent/material2/tree/ivy-repro-31314.
In the debugger,
ngModuleType.ngModuleDefis clearly undefined forBrowserAnimationsModulebut it is defined forMainModule.My guess atm is that we're using
bootstrapModuleFactorywhich doesn't work in Ivy? I'm still looking into it...Splaktar commentedon Dec 6, 2019
For the reproduction that I posted above, I believe that our solution to this was changing from
to
Please note that
ivy-ngcchas since been renamed tongcc.alxhub commentedon Dec 6, 2019
Thanks @Splaktar! Closing as resolved.
fclemonschool commentedon Dec 12, 2019
angular version 9.0.0-rc.6 error still occurs.
Splaktar commentedon Dec 12, 2019
@fclemonschool please provide a reproduction via a GitHub repo. This can be caused be a misconfiguration of a project, so we need to see the full project to debug.
Splaktar commentedon Dec 16, 2019
@vfe12345 Your repo link gives me a 404. Can you please open a new issue and reference this one?
angular-automatic-lock-bot commentedon Jan 16, 2020
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.