Skip to content

Fix broken module resolution#131

Merged
giarc3 merged 1 commit intomainfrom
fix-broken-resolution
Apr 30, 2026
Merged

Fix broken module resolution#131
giarc3 merged 1 commit intomainfrom
fix-broken-resolution

Conversation

@giarc3
Copy link
Copy Markdown
Member

@giarc3 giarc3 commented Apr 29, 2026

When trying to update examples to the latest TSC version I found that all imports failed. This was introduced between 4.0.0 and 4.1.0. When depending on 4.1.0 and later, there would be 2 nested src directories so the package.json didn't point to the correct files.

The culprit was import {version} from "../package.json";. When importing from outside the src directory, it implicitly changed the rootDir for the project and pushed everything down an extra src/. This change both fixes the offending line and also manually sets the rootDir so it can't happen again.

@giarc3 giarc3 merged commit 806cd2f into main Apr 30, 2026
7 checks passed
@giarc3 giarc3 deleted the fix-broken-resolution branch April 30, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants