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.

Downgrading from v3 yields a generate error

See original GitHub issue

Bug description

When doing the upgrade to v3, I found that downgrading from v3 to v2.26 yields an error. This is super important but can be annoying for the small time where you are upgrading to v3. This happened in yarn classic monorepo with one package containing the prisma and generating it for two other packages.

$ yarn workspace my-workspace prisma generate
yarn workspace v1.22.5
yarn run v1.22.5
$ prisma generate
Prisma schema loaded from prisma/schema.prisma
Error: Could not convert engine type libqueryEngine
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: /Users/Sytten/.nvm/versions/node/v14.17.6/bin/node
Arguments: /usr/local/Cellar/yvm/4.1.4/versions/v1.22.5/lib/cli.js prisma-generate
Directory: /Users/Sytten/Projects/my-project/packages/my-workspace

You have to delete the node_modules (or at least the prisma folder) manually to make it work.

How to reproduce

  1. Upgrade to v3
  2. Run yarn
  3. Downgrade to v2.26
  4. Run yarn
  5. Try to generate

Expected behavior

Works without issue

Environment & setup

  • OS: MacOS
  • Database: Postgres
  • Node.js version: 14.17.6

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
chaostheorycommented, Sep 23, 2021

@Sytten Thanks for the help, but unfortunately that didn’t work in my case

This is literally my entire schema.

// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

datasource db {
  provider = "sqlite"
  url      = "file:./test.db"
}

generator client {
  provider = "prisma-client-js"
}

model Patrol {
  id              Int                         @id @default(autoincrement())

  createdAt       DateTime                    @default(now())
  lastUpdatedAt   DateTime                    @default(now())
}

My sqlite database is also empty. Everything worked fine before the installing version 3

UPDATE: downgrading back to version 2 fixes everything.

1reaction
Syttencommented, Sep 22, 2021

My solution was to delete node_modules and it went away. Bit annoying but yeah 😕

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular injector error on component downgrading from v5 or ...
I tried this, but I get a this error in my console: Module '$$UpgradeModule' is not available! . – Nathan Friend. Apr 3,...
Read more >
VS2022 Preview 6.0 -- Downgrading a .NET 6.0 project to 5.0 ...
I tried to follow your steps to test in VS 2022 Preview 17.0.0 Preview 6.0, failed to reproduce this error and build successfully....
Read more >
Error After Downgrading From Windows 10 Back to 7
Today I took my laptop, that was upgraded to Windows 10, and tried to bring it back to Windows 7. I did this...
Read more >
Error with extensions after downgrading from 5.3 - Lucee Dev
I used the web interface to downgrade back to 5.2.9.31 and everything went fine but the extensions page gives me the error “The...
Read more >
Solidity revert with custom error explained with example
This contract reverts custom error if value sent in transaction is less than to a preset amount. // SPDX-License-Identifier: GPL-3.0 pragma ...
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