-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
needs: more infoReporter must clarify the issueReporter must clarify the issue
Description
Versions
npm 5.5.1
node 8.9.0
angular 5.0.1
angular-cli 1.5.4
Windows 10
Repro steps
- Generate project using ng new some-project
- Create module and link @scope/mymodule
- Compile module using ngc
- Link module npm link
- Link module to project cd some-project && npm link @scope/mymodule
- Start project ng serve
Observed behavior
Error: StaticInjectorError[NgZone]:
StaticInjectorError[NgZone]:
NullInjectorError: No provider for NgZone!
at _NullInjector.get (core.js:924)
at resolveToken (core.js:1212)
at tryResolveToken (core.js:1154)
at StaticInjector.get (core.js:1025)
at resolveToken (core.js:1212)
at tryResolveToken (core.js:1154)
at StaticInjector.get (core.js:1025)
at resolveNgModuleDep (core.js:10586)
at _createClass (core.js:10631)
at _createProviderInstance$1 (core.js:10597)
Desired behavior
The module is linked to project, errors are missing.
Mention any other details that might be useful (optional)
If I delete my @angular folder from a linked module, the application runs as expected. I wrote console.log on each @angular/core file (project and library, @angular/core/esm5/core.js) and revealed that project(some-project) used first @angular/core module while library(@scope/mymodule) used it's own @angular/core not root folder(node_modules) which is placed in the project directory.
MurhafSousli, seangwright, dskrypn, pdarii, johnking and 1 more
Metadata
Metadata
Assignees
Labels
needs: more infoReporter must clarify the issueReporter must clarify the issue