-
these are my local filesschema.prisma generator client {
provider = "dart run orm"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
age Int
email String @unique
name String?
}
.env DATABASE_URL="fil:./test.db" dependencies:
flutter:
orm: ^3.4.8 I followed the instructions in the document:1. dart pub add orm
2. bun prisma init --generator-provider="dart run orm"
3. bux prisma generate -> error
I encountered an error while executing this command
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Error: spawn dart run orm ENOENT
I want to know why this is? Did I use it incorrectly? How should I modify it |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 1 reply
-
@lsxqer Is it Windows? You can try editing The dart command should be a global command, but it doesn't seem to be handled correctly. |
Beta Was this translation helpful? Give feedback.
-
https://thecodersblog.com/demystifying-error-spawn-enoent-node-js |
Beta Was this translation helpful? Give feedback.
-
The command 'dart' is already in the path and is a global command I used it according to the documentation, but it seems that it is not working properly and cannot generate the code files required by PrismAClient dart -v Usage: dart <command|dart-file> [arguments] Global options: Available commands: Run "dart help " for more information about a command. |
Beta Was this translation helpful? Give feedback.
-
@lsxqer I'm investigating, Prisma + Windows + Bun I haven't reproduced it yet, it seems to be related to specific devices and settings. But I know you followed the documentation step by step, I will look for more devices to find the problem, please wait for me. |
Beta Was this translation helpful? Give feedback.
-
@lsxqer Can you provide me your Bun version number? |
Beta Was this translation helpful? Give feedback.
-
orm: ^3.4.8 @lsxqer I noticed that your orm version number is 3.4.8. The problem is found, please change the version number to 5.0.5 |
Beta Was this translation helpful? Give feedback.
-
I don't know what happened, using |
Beta Was this translation helpful? Give feedback.
orm: ^3.4.8
@lsxqer I noticed that your orm version number is 3.4.8. The problem is found, please change the version number to 5.0.5