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
incorrect paths for import statement is generated #1405
Comments
We had a similar issue yesterday. Was using a sibling library in a library using it's alias name "@somename/some-library" and imports were being transformed to relative paths. This was causing usage issues. |
See this as well for builds of https://github.com/graycoreio/daffodil. I was able to work around it by directly referencing the type in the child library. This appears to only happen for |
Having the same issue today. Any update on this? |
I can confirm, that this only happens for inferred types. One solution is to explicitly set the variable type. Or do |
The workaround is to set types explicitly. I have noticed for us, it only occurs if I am using some tsconfig path aliases instead of node_modules libraries. We are performing often a build to a build output folder for reusing artifacts without installing them to the local node_modules folder. This issue is kind of weird. I also noticed if you install the same library to your local node_modules and let the path alias point to it, it works without any issues. |
Above workaround fixed paths inside But even corrected paths like |
I have the same issue. Implicit types from another library in the project generates the wrong paths. The path is I've noticed the problem is reverse in the original bug report above, it generates |
same problem here, but solved with ng-package.json "dest" configuration. i've just added another
|
Old issue but still had this problem today. For me the |
Type of Issue
Description
incorrect paths for import statement can be generated when a project has multiple library workspaces.
I think the following issue is similar to this issue.
#1109
How To Reproduce
I created a repository for reproduce this bug.
git clone https://github.com/musou1500/test-angular-workspace
ng build lib2 && ng build lib1
dist/lib1/lib/lib1.service.d.ts
. then you can see an incorrect path for import onLib1Service.test
method.Expected Behaviour
the correct path for import statements should be generated.
Version Information
The text was updated successfully, but these errors were encountered: