npm link src with angular 5
See original GitHub issueI have symlinks enabled:
"build": {
"preserveSymlinks": true
}
but when I try to run against npm link with src, I get this error:
ERROR in ./node_modules/mylibrary/index.ts Module build failed: Error: /Users/sgentile/Workspaces/myproject/node_modules/mylibrary/index.ts is not part of the compilation output. Please check theother error messages for details.
Any ideas?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
[Pro Tip] `npm link` explained - DEV Community
npm link creates a symbolic link (symlink) from your <global node_modules> directory to the local library's directory. · The catch is that you ......
Read more >Linking local library into Angular 5 Project - Stack Overflow
open two terminal windows · in the first terminal, go to your Angular library's root folder and run ng build --watch · check...
Read more >Readme - @angular/cli - npm
Generating and serving an Angular project via a development server ... Navigate to http://localhost:4200/ . The app will automatically reload if ...
Read more >Angular 5: NPM Link - model/index.ts is not part of the ... - GitHub
The error I'm getting is: node_modules/other-repo/src/lib/index.ts is not part of the compilation output. Please check the other error messages ...
Read more >Test and debug Angular library using npm link - Dmitri Galejev
What happens is we have placed the library project files into a global node_modules location. You can run this command to find out...
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 FreeTop 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
Top GitHub Comments
For development so you don’t have to recompile after every change. What you described is very time consuming and not very productive
Certainly before preparing for release we link to dist.
On Dec 30, 2017 3:41 AM, “Ante Adamovic” notifications@github.com wrote:
Why are you trying to link the src anyway, you’re suppose to link the dist directory. Angular 5 has known issues with compilation so it often doesn’t accept raw TS files from third party libraries. I’ve ran into this problem with my own library which is why I’m checking this one out and it works great, simply run npm run build and then switch to dist directory and run npm link there.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jvandemo/generator-angular2-library/issues/252#issuecomment-354534636, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIFND97U1Aabeep5RpJNmiq20AJLxASks5tFfcugaJpZM4REtK5 .
Why are you trying to link the
src
anyway, you’re suppose to link thedist
directory. Angular 5 has known issues with compilation so it often doesn’t accept raw TS files from third party libraries. I’ve ran into this problem with my own library which is why I’m checking this one out and it works great, simply runnpm run build
and then switch todist
directory and runnpm link
there.