-
Notifications
You must be signed in to change notification settings - Fork 12k
Module resolution since 1.0.4 is broken when symlinking secondary projects #6482
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
Please see the documentation here for information pertaining to the use of linked libraries during development. |
I have and it still does not fix my issue. |
I have same problem today with 1.0.6 |
@pumano At the bottom of my post, I have a temporary fix. Hopefully the AngularCLI team will fix this. |
@Blackburn29 the documentation item that @clydin linked should allow working with linked libraries. All the errors you have seem to be related to missing sourcemaps:
We ignore sourcemaps listed in node_modules but not anywhere else, and if you have a symlinked project then its real path is not in node_modules. That might be the cause. If you can setup a simple repro I can take a look, but without one the best I can say is that your library might not be packaged correctly. |
I just encountered this issue today with
The module causing this error is |
@menzer it is caused because you use yarn. i don't know why, but yarn postinstall can cause that problems. I use npm, because yarn harm builds. |
@pumano it's not caused by yarn. I have the exact same issue, I don't use yarn. |
@pumano I don't use yarn either. |
@menzer this is the root of my problem. Not the source maps as @filipesilva mentioned. FWIW ive tried both NPM and Yarn. It is irrelevant to this issue. |
@menzer Please ensure that your application is configured appropriately for linked library usage. See this comment from a similar issue for details. Also, please ensure that your linked library follows the other guidelines provided in the documentation mentioned above as well. @Blackburn29 The next beta (1.2.0-beta.1) will have a new command line option |
@Blackburn29 To ensure your use case is captured and tested, are you using a monorepo setup (lerna or otherwise)? |
@clydin Thank you for linking me to the comment on the similar issue. I've resolved my problem, and I think I've identified the source of the confusion. I read the documentation you linked to in the Wiki, but the description of the necessary step is less clear than your description in that issue. I'm actually still unclear whether the documentation is confusing, or the documentation and the comment describe two different, necessary, steps. From the documentation:
From the comment:
Before ever encountering the issue, my library was set up as instructed in the documentation. My As an aside, Thanks for the help resolving my issue, and I hope this feedback helps identify the root cause of people encountering this issue after reading your docs. |
I have managed to reproduce this in the attached (@filipesilva). The error is:
I have followed the linked guide but it hasn't worked for me - if you can spot what I've done wrong (if anything) I'd be grateful for any pointers. In a nutshell, I've done the following and am still getting the error:
Attached
Steps to reproduce
Versions
WorkaroundYou can work around the issue as follows:
If you need to rebuild the library then you can run:
(then restart UPDATE (05 Nov 17) I upgraded to
|
I've run into the same issue. it use to work but doesn't any more. I have fallen back to npm pack and using a direct linked tar ball, but I would rather use npm link. In my case we have separate package.json's for development and deployment following the ng material 2 project structure. |
So this is still broken... Time to replace angular with vue I think. |
@babeal Thanks for the suggestion. In the example I posted earlier, the application loads without issue via I found the source of the issue, which was that another dependency I was using (angular-datatables) was also including This is a bit of a diversion from the original issue, but it seems clear that if any dependency bundles
I don't think that libraries should be bundling core angular libraries, because that is what the |
I'm not bundling it and I'm getting the error anyway. Using now |
@dgroh do you hit this issue with the latest CLI? |
Closing the issue due to inactivity. If the problem still exists in the latest version of the CLI, please open a new issue following the template and providing a minimal demo where we can reproduce it. Thanks! :-) |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
Output from:
ng --version
.MacOS Sierra
Repro steps.
The log given by the failure.
ng serve --port 5555
angular-cli
Browser
The warning above are my 3 projects that are symlinked into my CLI app.
If i remove the
node_modules
folder fromhttps://github.com/angular/angular-cli/blob/master/packages/@angular/cli/models/webpack-configs/common.ts#L70
Everything compiles fine. This change was introduced via 1659b74
on 1.0.4
The text was updated successfully, but these errors were encountered: