Skip to content

fix(nest): set moduleResolution to node to prevent TS5095 error#33607

Merged
Coly010 merged 1 commit intonrwl:masterfrom
fALKENdk:fix/nest-module-resolution
Nov 25, 2025
Merged

fix(nest): set moduleResolution to node to prevent TS5095 error#33607
Coly010 merged 1 commit intonrwl:masterfrom
fALKENdk:fix/nest-module-resolution

Conversation

@fALKENdk
Copy link
Copy Markdown
Contributor

When generating NestJS applications in Angular workspaces, the base tsconfig sets moduleResolution to 'bundler' which causes TS5095 errors because 'bundler' requires module to be 'preserve' or 'es2015+'.

NestJS applications should use Node.js module resolution instead. This fix sets moduleResolution to 'node' for NestJS applications (except when using TS solution setup, which uses 'nodenext').

Fixes #33589

When generating NestJS applications in Angular workspaces, the base tsconfig sets moduleResolution
to 'bundler', which causes TS5095 errors because 'bundler' requires module to be 'preserve' or
'es2015+'. NestJS applications should use Node.js module resolution instead.
This fix sets moduleResolution to 'node' for NestJS applications (except when using TS solution
setup, which uses 'nodenext').

closed #33589
@fALKENdk fALKENdk requested a review from a team as a code owner November 25, 2025 11:00
@fALKENdk fALKENdk requested a review from JamesHenry November 25, 2025 11:00
@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 25, 2025

👷 Deploy request for nx-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit d5ae87c

@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 25, 2025

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

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Nov 25, 2025 11:05am

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Nov 25, 2025

View your CI Pipeline Execution ↗ for commit d5ae87c

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 22m 13s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 2m 33s 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-11-25 12:21:24 UTC

@Coly010 Coly010 self-assigned this Nov 25, 2025
@Coly010 Coly010 merged commit 3c5e40b into nrwl:master Nov 25, 2025
16 of 17 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 1, 2025

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 Dec 1, 2025
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.

Bug: @nx/nest throws TS5095 in clean workspace

2 participants