npm link doesn't work with 1.5.4 version
See original GitHub issueVersions
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.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:15 (2 by maintainers)
Top Results From Across the Web
Why isn't the npm link command working? | Benjamin W Fox
This article is for anyone testing npm packages locally and who has struggled (or is struggling) to get to projects connected via npm...
Read more >1.5.4 - @angular/cli - npm
CLI tool for Angular. Latest version: 15.0.4, last published: 9 days ago. Start using @angular/cli in your project by running `npm i ...
Read more >What could cause an error related to npm not being able to ...
It might be related to corruption in Angular Packages or incompatibility of packages. Please follow the below steps to solve the issue. Delete ......
Read more >Npm link set up advice and troubleshooting - Code Buckets
Troubleshooting npm link · 1. Check you've linked every package · 2. Don't globally install your local packages · 3. Check you've linked...
Read more >Using npm link to use node modules that are "in progress"
It is some times convenient, even necessary, to make use of a module that you are working on before it has been published...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Maybe my fault,try “–preserve-symlinks”.
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.