question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`db push` / `migrate` is hiding the binary download process during `generate`, leading to confusion

See original GitHub issue

Bug description

When you enable Napi and try npx prisma db push --preview-feature the process stuck running the generators.

How to reproduce

  1. Enable Napi by adding previewFeatures = ["napi"] to your schema.prisma
  2. Run npx prisma db push --preview-feature
  3. 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:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
janpiocommented, May 10, 2021

Thanks, so we should really make sure this is more visible to users and they/you will not be confused about this any more.

2reactions
carlitorwebcommented, May 8, 2021

@janpio is correct, after remove the node_modules, and run npm 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found