-
Notifications
You must be signed in to change notification settings - Fork 119
Issue with npm link #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
While I am not using Webpack but SystemJs I have been struggling with a Linked library project for a day or two myself. The typescript compiler shows errors on the app side because of the /// references in your library ts code. If you remove them then your app will compile but your library will not. The only way to get your library ts to compile without the /// ref path is to add all your files to the tsconfig files array pulling in the node_modules/angular2/typings/browser.d.ts first and then your library ts files. I did not want to maintain this files array manually so I used a Gulp tool to build my tsconfig file from file globs "https://www.npmjs.com/package/gulp-tsconfig". This so far has solved my problems on both sides. This issue will most likely only occur when you have a linked npm package project with typescript files, not sure there is much the developer of this project can do about it, I just had to get creative in order to fix mine. Hope this helps |
@pauljeter — Can you let me know if @jbeckton's suggestion of adding the library to If so, I will add additional documentation to the README to instruct others how to actually consume a library in an application. Thanks in advance! @jbeckton — Thank you for your input! |
Sorry, I was a AFK this weekend. I will try and report back. |
@pauljeter — Thank you! |
@pauljeter — Will close this issue for now. Feel free to re-open if you think it is still an issue. Thanks! |
I am experiencing an issue with a generated ng2-library when attempting to npm link into a project using webpack. I created an ng2-library-test from the generator, and did not change any of the boilerplate code. I published the library to npm at ng2-library-test and installed it in a boilerplate project here. When I run the project all works as expected. However, when I
npm link
the library locally, I get errors when trying to run the project:Any ideas? Have you been able to
npm link
with a generated library successfully?The text was updated successfully, but these errors were encountered: