Skip to content

fix(core): convert filePath to an absolute path before typescript resolves the module#34001

Merged
jaysoo merged 3 commits intonrwl:masterfrom
qing-lin-007:fix-issues-33985
Dec 29, 2025
Merged

fix(core): convert filePath to an absolute path before typescript resolves the module#34001
jaysoo merged 3 commits intonrwl:masterfrom
qing-lin-007:fix-issues-33985

Conversation

@qing-lin-007
Copy link
Contributor

@qing-lin-007 qing-lin-007 commented Dec 29, 2025

Current Behavior

TypeScript’s module resolution stop at project's root when resolving modules.

Expected Behavior

TypeScript’s module resolution will walk up to the workspace root when resolving modules

Changes Made

Convert the filePath to an absolute path inside findProjectFromImport before calling resolveImportWithTypescript, because TypeScript’s module resolution will not correctly traverse up the directory tree toward the workspace root when given a relative path.

Related Issue(s)

Fixes #33985

…olves the module

Convert the filePath to an absolute path inside findProjectFromImport before calling
resolveImportWithTypescript, because TypeScript’s module resolution will not correctly traverse up
the directory tree toward the workspace root when given a relative path.

closed nrwl#33985
@qing-lin-007 qing-lin-007 requested review from a team as code owners December 29, 2025 11:55
@netlify
Copy link

netlify bot commented Dec 29, 2025

‼️ Deploy request for nx-docs rejected.

Name Link
🔨 Latest commit 0b710a2

@vercel
Copy link

vercel bot commented Dec 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
nx-dev Ready Ready Preview Dec 29, 2025 3:17pm

@qing-lin-007 qing-lin-007 changed the title fix(core): convert filePath to an absolute path before typescript res… fix(core): convert filePath to an absolute path before typescript resolves the module Dec 29, 2025
@nx-cloud
Copy link
Contributor

nx-cloud bot commented Dec 29, 2025

View your CI Pipeline Execution ↗ for commit 02f3a32

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 10m 49s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 2m 52s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 11s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-29 16:39:00 UTC

nx-cloud[bot]

This comment was marked as outdated.

Copy link
Contributor

@nx-cloud nx-cloud bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nx Cloud has identified a flaky task in your failed CI:

Since the failure was identified as flaky, the solution is to rerun CI. Because this branch comes from a fork, it is not possible for us to push directly, but you can rerun by pushing an empty commit:

git commit --allow-empty -m "chore: trigger rerun"
git push

Nx Cloud View detailed reasoning in Nx Cloud ↗


🎓 Learn more about Self-Healing CI on nx.dev

@jaysoo jaysoo merged commit 3735641 into nrwl:master Dec 29, 2025
17 of 19 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Module Boundary Rules Not Enforced Due to Nx TargetProject Resolver Not Resolving Target Project Correctly

2 participants