`db push` / `migrate` is hiding the binary download process during `generate`, leading to confusion
See original GitHub issueBug description
When you enable Napi and try npx prisma db push --preview-feature
the process stuck running the generators.
How to reproduce
- Enable Napi by adding
previewFeatures = ["napi"]
to your schema.prisma - Run
npx prisma db push --preview-feature
- The process then stuck at:
Running generate... (Use --skip-generate to skip the generators)
Expected behavior
Generators finish successful
Prisma information
generator client {
provider = "prisma-client-js"
previewFeatures = ["napi"]
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
model Posts {
id Int @id @default(autoincrement())
title String
content String @db.VarChar(500)
creator User @relation(fields: [authorId], references: [id])
authorId Int
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model User {
id Int @id @default(autoincrement())
posts Posts[]
name String
email String @unique
password String
status String @default("I am new!")
}
Environment & setup
- OS: LTS Ubuntu
- Database: MySQL - MariaDB (Docker image:
linuxserver/mariadb:latest
) - Node.js version: LTS (but also tested with v16 with same result)
- Prisma version: 2.21.2
prisma : 2.21.2
@prisma/client : 2.21.2
Current platform : debian-openssl-1.1.x
Query Engine : query-engine e421996c87d5f3c8f7eeadd502d4ad402c89464d (at node_modules/@prisma/engines/query-engine-debian-openssl-1.1.x)
Migration Engine : migration-engine-cli e421996c87d5f3c8f7eeadd502d4ad402c89464d (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core e421996c87d5f3c8f7eeadd502d4ad402c89464d (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary : prisma-fmt e421996c87d5f3c8f7eeadd502d4ad402c89464d (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : e421996c87d5f3c8f7eeadd502d4ad402c89464d
Studio : 0.371.0
Preview Features : napi
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Prototype your schema - Prisma
Use db push to prototype a schema at the start of a project and initialize a migration history when you are happy with...
Read more >WP Migrate DB Pro Changelog - Delicious Brains
Bug fix: Updating WP Migrate DB Pro via WP-CLI now includes license key in the download link; Bug fix: Opening Find & Replace...
Read more >SAP S/4HANA System Conversion – Custom code adaptation ...
Why do you need to adapt your custom code during system conversion from the classic SAP ERP system running on any DB to...
Read more >Deploy an Access application - Microsoft Support
This article discusses basic deployment planning, packaging and signing, deploying database applications, and the Access Runtime environment. What do you want ...
Read more >SQL Developer Concepts and Usage - Oracle Help Center
Create at least one database connection (or import some previously exported connections), so that you can view and work with database objects, use...
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 Free
Top 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
Thanks, so we should really make sure this is more visible to users and they/you will not be confused about this any more.
@janpio is correct, after remove the
node_modules
, and runnpm install
the process was running in the background.Today I install v2.22.1, and I see a script downloaded already the engine, so this problem will not repeat from new install.