Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

ng update to 9.0 leaves ModuleMapLoader in app.server.ts #1272

@vikerman

Description

@vikerman

Bug Report

After updating a 8.x @nguniveral/express-engine app to 9.0.0-next.3, I get the following error when trying to run the application:

NullInjectorError: R3InjectorError[router_RouterModule -> router_Router -> NgModuleFactoryLoader -> InjectionToken MODULE_MAP -> InjectionToken MODULE_MAP -> InjectionToken MODULE_MAP]:
NullInjectorError: No provider for InjectionToken MODULE_MAP!
at NullInjector.get (/home/viks/test/ng8x/dist/server/main.js:77347:27)
at R3Injector.get (/home/viks/test/ng8x/dist/server/main.js:91746:33)
at R3Injector.get (/home/viks/test/ng8x/dist/server/main.js:91746:33)
at R3Injector.get (/home/viks/test/ng8x/dist/server/main.js:91746:33)
at injectInjectorOnly (/home/viks/test/ng8x/dist/server/main.js:77226:33)
at Module.ɵɵinject (/home/viks/test/ng8x/dist/server/main.js:77236:57)
at Object.ModuleMapNgFactoryLoader_Factory [as factory] (/home/viks/test/ng8x/dist/server/main.js:183:409)
at R3Injector.hydrate (/home/viks/test/ng8x/dist/server/main.js:91972:63)
at R3Injector.get (/home/viks/test/ng8x/dist/server/main.js:91734:33)
at injectInjectorOnly (/home/viks/test/ng8x/dist/server/main.js:77226:33)

What is the expected behavior?

No Exception

What is the current behavior?

Exception thrown

What modules are related to this issue?

- [ ] aspnetcore-engine
- [x] common
- [x] express-engine
- [x] hapi-engine
- [ ] module-map-ngfactory-loader

The update schematics should remove the ModuleMapLoader from app.server.ts (and optionally provideModuleMap from main.server.ts)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions