Redwood: Recurring Prisma problems on RW upgrades.

Created on 4 Sep 2020  Â·  2Comments  Â·  Source: redwoodjs/redwood

This has happened to me at least half a dozen times through a couple of RW projects when doing yarn rw upgrade.
The project crashes for various reasons, usually related to Prisma ( can't recall any that wasn't ).

For v0.17.0 I ended up having this:

 |   Failed to validate the query `Error occurred during query validation & transformation:
api | Query (object)
api |   ↳ findManyOrder (field)
api |     ↳ where (argument)
api |       ↳ OrderWhereInput (object)
api |         ↳ restaurantId (field)
api |           ↳ Value types mismatch. Have: Object({"equals": Int(1)}), want: Scalar(Int)` at `.Query.findManyOrder.where.OrderWhereInput.restaurantId`

On @peterp 's advice I ran again yarn rw db up, which prompted me this:

Error: 
Error: ETXTBSY: text file is busy, copyfile './node_modules/@prisma/cli/query-engine-debian-openssl-1.1.x' -> './node_modules/.prisma/client/query-engine-debian-openssl-1.1.x'

The good ol'fashioned rm -rf node_modules && yarn install did the trick though :), as it did for any of the previous occurrences.

I know others in the community have had such issue but I was wondering if it was really widespread, or the privilege of a selected few. Either way it's worth a trail.

For the record I'm running this:

  System:
    OS: Linux 5.4 Ubuntu 20.04 LTS (Focal Fossa)
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 13.14.0 - /tmp/yarn--1599209710925-0.5737115052022908/node
    Yarn: 1.22.4 - /tmp/yarn--1599209710925-0.5737115052022908/yarn
  Browsers:
    Chrome: 85.0.4183.83

Done in 5.71s.

Could be a problem w/ Ubuntu.

bu1-repro-available hacktoberfest

Most helpful comment

Thanks @noire-munich!

I wonder if we shouldn't "reset prisma" after an upgrade by:

  1. letting the user know that we're going to shut down the dev-server.
  2. shutting down the dev-server if it's running (using kill-port)
  3. deleting node_modules/@prisma, node_modules/.prisma
  4. running yarn rw db up

I think this is something that people are going to experience fairly often!

All 2 comments

Thanks @noire-munich!

I wonder if we shouldn't "reset prisma" after an upgrade by:

  1. letting the user know that we're going to shut down the dev-server.
  2. shutting down the dev-server if it's running (using kill-port)
  3. deleting node_modules/@prisma, node_modules/.prisma
  4. running yarn rw db up

I think this is something that people are going to experience fairly often!

Hi @peterp !
Just pushed related #1155
I have testing issues on my contribs ( investigating them on another pr though ), and I'm not sure how I could test that. Meanwhile the code is fairly simple, so... what do you think about it?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tobbe picture Tobbe  Â·  4Comments

wispyco picture wispyco  Â·  3Comments

tmeasday picture tmeasday  Â·  4Comments

jtoar picture jtoar  Â·  4Comments

balaji-balu picture balaji-balu  Â·  3Comments