Rider incorrectly imports Typescript modules from local filepaths, creating invalid syntax

I have two Typescript packages I am developing, `lib` and `ui`. The latter imports the former in `package.json` via a peerDependency. The UI package also specifies its rootDir, baseUrl, and include paths to scope it into the "src" folder. Rider is able to detect everything correctly, because I am able to import from "@openworkshop/lib" in the UI project without issue.

However, when I use the context menu to automatically import a file, Rider incorrectly chooses to use the relative path ("../../lib"). This violates the typescript compilation rules, as it resides outside the src directory of the module. The "lib" and "ui" folders share a parent folder, so this means Rider is pulling the import from outside even the typescript compilation directory.

I suspect it has to do with the fact that the package is "yarn link"-ed, so Rider is incorrectly resolving via a symlink to the local directory instead of just using the module name.

1 comment

can't reproduce

could you share a sample project the issue can be repeated with?


Please sign in to leave a comment.