Using 3.12.0, software simply crashes
See original GitHub issueBug description
After installing @prisma/client and prisma CLI at version 3.12.0, node simply crashes without any output. the code works when removing:
const { PrismaClient } = require("@prisma/client");
const prisma = new PrismaClient();
So it’s clearly a Prisma issue, but there is not output to trace it.
prisma generate
works fine without errors.
How to reproduce
- install version 3.12.0
- add prisma client after generating
- crash.
Expected behavior
no crash. code should run.
Prisma information
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
model Account {
id Int @id @default(autoincrement()) @db.UnsignedInt
profile_id Int @db.UnsignedInt
name String @default("") @db.VarChar(255)
color String? @default("") @db.VarChar(100)
initialBalance Decimal @default(0.00) @db.Decimal(10, 10)
currency String @default("USD") @db.Char(3)
created_at DateTime? @db.DateTime(0)
updated_at DateTime? @db.DateTime(0)
Transaction Transaction[] @relation("account")
@@map("accounts")
}
model Balance {
id Int @id @default(autoincrement()) @db.UnsignedInt
account_id BigInt @db.UnsignedBigInt
year Int @db.UnsignedInt
balance Decimal @db.Decimal(10, 2)
updated_at DateTime? @db.DateTime(0)
@@map("balances")
}
model Category {
id Int @id @default(autoincrement()) @db.UnsignedInt
profile_id BigInt @db.UnsignedBigInt
name String @default("") @db.VarChar(255)
isBusinessExpense Int @default(0) @db.UnsignedTinyInt
percentageDeductable Decimal @default(0.00) @db.Decimal(10, 2)
created_at DateTime? @db.DateTime(0)
updated_at DateTime? @db.DateTime(0)
Transaction Transaction[] @relation("category")
}
model Project {
id Int @id @default(autoincrement()) @db.UnsignedInt
profile_id Int @db.UnsignedInt
name String @default("") @db.VarChar(255)
created_at DateTime? @db.DateTime(0)
updated_at DateTime? @db.DateTime(0)
@@map("projects")
}
model Subject {
id Int @id @default(autoincrement()) @db.UnsignedInt
profile_id Int @db.UnsignedInt
name String @default("") @db.VarChar(255)
created_at DateTime @db.DateTime(0)
updated_at DateTime @db.DateTime(0)
Transaction Transaction[] @relation("subject")
@@map("subjects")
}
model Transaction {
id Int @id @default(autoincrement()) @db.UnsignedInt
profile_id Int @db.UnsignedInt
account_id Int @db.UnsignedInt
account Account @relation("account", fields: [account_id], references: [id])
category_id Int? @db.UnsignedInt
category Category? @relation("category", fields: [category_id], references: [id])
subject_id Int? @db.UnsignedInt
subject Subject? @relation("subject", fields: [subject_id], references: [id])
date DateTime? @db.Date
amount Int @default(0)
vat Int @default(0)
note String? @db.VarChar(255)
transaction_id Int? @unique @db.UnsignedInt
transfer Transaction? @relation("transfer", fields: [transaction_id], references: [id])
transaction Transaction? @relation("transfer")
is_transfer Int @default(0)
created_at DateTime? @db.DateTime(0)
updated_at DateTime? @db.DateTime(0)
@@map("transactions")
}
model UserProfile {
id Int @id @default(autoincrement()) @db.UnsignedInt
user_id Int @db.UnsignedInt
profile_id Int @db.UnsignedInt
profiles Profile @relation("profilesTouser_profiles", fields: [profile_id], references: [id])
users User @relation("user_profilesTousers", fields: [user_id], references: [id])
@@index([profile_id], name: "fk_profiles")
@@index([user_id], name: "fk_users")
@@map("user_profiles")
}
model User {
id Int @id @default(autoincrement()) @db.UnsignedInt
email String @unique @default("") @db.VarChar(255)
name String? @db.VarChar(255)
password String? @db.VarChar(255)
created_at DateTime @db.DateTime(0)
updated_at DateTime @db.DateTime(0)
user_profiles UserProfile[] @relation("user_profilesTousers")
@@map("users")
}
model Profile {
id Int @id @default(autoincrement()) @db.UnsignedInt
name String @default("") @db.VarChar(255)
created_at DateTime? @db.DateTime(0)
updated_at DateTime? @db.DateTime(0)
user_profiles UserProfile[] @relation("profilesTouser_profiles")
@@map("profiles")
}
Environment & setup
- OS: mac os 12.3
- Database: mysql 8.0.24
- Node.js version: v16.13.2
Prisma Version
as mentioned, 3.12.0
Issue Analytics
- State:
- Created a year ago
- Comments:17 (9 by maintainers)
Top Results From Across the Web
3.12..0 b2351 - FullSize H4 - FATAL MID-SHOW CRASH
Mid-Show, all 3 console lcd displays go back. Output freezes, PlayBack LEDs stay flashing. After waiting 30s, the screens flash CONSOLE RESTARTING..... in...
Read more >Mantid 3.12.0 Release Notes
We are proud to announce version 3.12.0 of Mantid. ... These are just some of many improvements in this release, so please take...
Read more >His PC keeps crashing... let's figure out what went wrong...
His computer continues to crash, so let's troubleshoot what went wrong. New Players Sign Up for World of Warships using my link ...
Read more >Interpreter crash when get midi message - Questions - scsynth
It looks to me like any of the MIDI messages “MTC quarter frame,” “song position,” “song select” cause SC in Windows to crash....
Read more >The Software Crashes - Saleae Support
If the software can start properly, but crashes during operation, please first ensure that you are using the latest version of the Logic...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Had the same issue, deleting node_modules and reinstalling is what got it working again
Could not reproduce in a new project. After removing node_modules & yarn.lock all issues were solved. Tried downgrading to 3.10 and upgrading to 3.12 again but the error does not occur anymore.