Why doesn't extensionless imports work when the generated prisma client uses extensionless imports? · prisma/prisma · Discussion #29465 · GitHub
Skip to content
Discussion options

You must be logged in to vote

switching to nodenext didn't work either. still had the same error for my imports, as well as prisma's imports

using tsx can work, however there is an official solution for this. we can update our schema.prisma file to reflect the following:

generator client {
    importFileExtension = "js"
}

this makes sure that when we generate our prisma client, it includes the specified file extension in it's import statements
https://www.prisma.io/docs/orm/reference/prisma-schema-reference#fields-for-prisma-client-provider

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by m2x07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants