Module not found: Can't resolve './enums.js'
Hello !
I migrate to v7 and i have problems.
errors:
My schema.prisma:
prisma.config.ts
./src/generated/prisma/client.ts:20:1
Module not found: Can't resolve './internal/class.js'
./src/generated/prisma/client.ts:20:1
Module not found: Can't resolve './internal/prismaNamespace.js'
./src/generated/prisma/client.ts:24:1
Module not found: Can't resolve './enums.js'
./src/generated/prisma/client.ts:20:1
Module not found: Can't resolve './internal/class.js'
./src/generated/prisma/client.ts:20:1
Module not found: Can't resolve './internal/prismaNamespace.js'
./src/generated/prisma/client.ts:24:1
Module not found: Can't resolve './enums.js'
generator client {
provider = "prisma-client"
binaryTargets = ["native", "debian-openssl-1.1.x"]
output = "../src/generated/prisma"
}
datasource db {
provider = "mysql"
}
model...
generator client {
provider = "prisma-client"
binaryTargets = ["native", "debian-openssl-1.1.x"]
output = "../src/generated/prisma"
}
datasource db {
provider = "mysql"
}
model...
import 'dotenv/config';
import { defineConfig, env } from 'prisma/config';
export default defineConfig({
schema: 'prisma/schema.prisma',
migrations: {
path: 'prisma/migrations',
seed: 'tsx prisma/seed.ts',
},
datasource: {
url: env('DATABASE_URL'),
},
});
import 'dotenv/config';
import { defineConfig, env } from 'prisma/config';
export default defineConfig({
schema: 'prisma/schema.prisma',
migrations: {
path: 'prisma/migrations',
seed: 'tsx prisma/seed.ts',
},
datasource: {
url: env('DATABASE_URL'),
},
});

2 Replies
Okey i found, i added 2 lines and its ok
generator client {
provider = "prisma-client"
binaryTargets = ["native", "debian-openssl-1.1.x"]
output = "../src/generated/prisma"
this --> generatedFileExtension = "ts"
this --> importFileExtension = "ts"
}
generator client {
provider = "prisma-client"
binaryTargets = ["native", "debian-openssl-1.1.x"]
output = "../src/generated/prisma"
this --> generatedFileExtension = "ts"
this --> importFileExtension = "ts"
}
Glad to hear that you were able to resolve the issue 🙌