-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Type resolution in linked packages - Updated Repro #36866
Comments
I will refer my closed issue as related here. It seems to be the same problem: #33137 Lastly I've discovered this may happens even inside node modules (when there are more than one package that depends on another module (C) in different major versions). TypeScript compiler cache is not handling NodeJS module resolution described in: I also think that the pull request #33567 is a close approach to the solution. |
That's pretty much what happens to me. It's an issue even when the packages are not linked, just being a dependency already triggers this. Also, it doesn't have to be a major version difference, any version difference causes the issue. |
You're right, it is a different problem. @simonfox Have you tried to set 'preserveSymlinks' true in tsconfig.json? You can find more information in official documentation |
@imt-jaime |
…tly maintained Adds test for #36866
…37438) * Convert symlink scenarios to virtual FS where its symlinks are correctly maintained Adds test for #36866 * Fix the casing issue when redirects differ in casing of the file * Make ModuleSpecifierResolutionHost internal * Refactoring for ModuleSpecifierResolutionHost * If any of the file path option is from node_modules folder, consider only paths in node_modules folder * Update src/services/utilities.ts Co-Authored-By: Andrew Branch <andrewbranch@users.noreply.github.com> Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
If anyone find this issue, it seems fixed on the |
I'm still having this issue even when using typescript 3.9.x. I'll set up a repository to make it easier to simulate the problem. |
|
I am still suffering from the issue described in #32970
I that issue I provided a repro and that repro was resolved by #33567
However in my actual application I still face the original issue described (the repro was intentionally simplified). Get
error TS2742: The inferred type of 'actions' cannot be named without a reference to 'drive-common/node_modules/typescript-fsa'. This is likely not portable. A type annotation is necessary.
when usingyarn link
to link packages for dev.I have updated my original repro to re-expose the problem. Follow steps below...
clone https://github.com/simonfox/repro-plugin-one
clone https://github.com/simonfox/repro-plugin-two
run
yarn
for bothrun
yarn link
in plugin two rootrun
yarn link plugin-two
in plugin one rootyou will see the issue in src/features/feature-one/actions.ts (you may need to reload the VS Code window after linking).
cc @sheetalkamat
The text was updated successfully, but these errors were encountered: