P
Prisma•2w ago
Alexandre_

Module not found: Can't resolve './enums.js'

Hello ! I migrate to v7 and i have problems. errors:
./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'
My schema.prisma:
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...
prisma.config.ts
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'),
},
});
No description
2 Replies
Alexandre_
Alexandre_OP•2w ago
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"
}
Nurul
Nurul•2w ago
Glad to hear that you were able to resolve the issue 🙌

Did you find this page helpful?