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.8I 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 |
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. |
|
https://thecodersblog.com/demystifying-error-spawn-enoent-node-js |
|
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. |
|
@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. |
|
@lsxqer Can you provide me your Bun version number? |
|
I don't know what happened, using |
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