docs(generators): add tip for tsx users about importFileExtension#7714
docs(generators): add tip for tsx users about importFileExtension#7714Andrew1326 wants to merge 1 commit intoprisma:mainfrom
Conversation
Users running Prisma 7's generated client with tsx frequently encounter 'Cannot find module ./internal/class.js' errors because tsx cannot resolve .js imports to .ts files. This adds a tip explaining the fix (importFileExtension = "ts") directly in the generators reference. Addresses recurring questions in Discussions #29318, #29347.
|
@Andrew1326 is attempting to deploy a commit to the Prisma Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughDocumentation added to the Prisma schema generators guide explaining how to resolve runtime module resolution errors when using Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
importFileExtension = "ts"fix fortsxusersCannot find module './internal/class.js'error when running Prisma 7's generated client withtsxContext
This is a frequently asked question in Prisma Discussions (#29318, #29347). The generated client uses
.jsimport extensions (ESM convention), buttsxcannot resolve.jsto.tsfiles on disk. The fix is simple (importFileExtension = "ts"), but users struggle to find it since the current docs don't mentiontsxspecifically.Summary by CodeRabbit
tsxruntime module resolution errors with Prisma. The section includes a practical configuration example and explains how aligning the import file extension setting totsresolves conflicts between generated client imports andtsx's module resolution expectations.