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.

Upgrade to Prisma 4.0 → WeakRef is not defined

See original GitHub issue

Bug description

Hi,

I’ve recently switched to prisma 4 (didn’t did it before because of the Explicit @unique constraints on one-to-one relations)

Everything works fine in my local env (my computer mac os 12.6 / node 16.5) but when I reload my server (An ubuntu VPS on linode - Ubuntu 22.04.1 LTS) I get this message

9|xxxxxxxxxx-back  | You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
9|xxxxxxxxxx-back  | ReferenceError: WeakRef is not defined
9|xxxxxxxxxx-back  |     at LibraryEngine.loadEngine (/srv/xxxxxxxxxx/api/node_modules/@prisma/client/runtime/index.js:26097:26)
9|xxxxxxxxxx-back  |     at async LibraryEngine.instantiateLibrary (/srv/xxxxxxxxxx/api/node_modules/@prisma/client/runtime/index.js:26051:5)
9|xxxxxxxxxx-back  |     at async LibraryEngine.getConfig (/srv/xxxxxxxxxx/api/node_modules/@prisma/client/runtime/index.js:26263:5)
9|xxxxxxxxxx-back  |     at async PrismaClient._getActiveProvider (/srv/xxxxxxxxxx/api/node_modules/@prisma/client/runtime/index.js:30525:30)

How to reproduce

/

Expected behavior

No response

Prisma information

/

Environment & setup

  • OS: Ubuntu 22.04.1 LTS
  • Database: MySQL
  • Node.js version: v16.15.0

Prisma Version

prisma                  : 4.3.1
@prisma/client          : 4.3.1
Current platform        : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine c875e43600dfe042452e0b868f7a48b817b9640b (at node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Migration Engine        : migration-engine-cli c875e43600dfe042452e0b868f7a48b817b9640b (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine    : introspection-core c875e43600dfe042452e0b868f7a48b817b9640b (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary           : prisma-fmt c875e43600dfe042452e0b868f7a48b817b9640b (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Format Wasm             : @prisma/prisma-fmt-wasm 4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b
Default Engines Hash    : c875e43600dfe042452e0b868f7a48b817b9640b
Studio                  : 0.473.0
Preview Features        : fullTextSearch, fullTextIndex

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
luminous8commented, Sep 25, 2022

Found the issue, I’m using pm2 and even if you update the node version, you need to refresh pm2 with pm2 update to use the node version installed

1reaction
luminous8commented, Sep 23, 2022

I’ve seen that ticket but I’m using node 16.15.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prisma/Client : WeakRef is not defined - node.js
Message: Error in Prisma Client request: WeakRef is not defined Query: ... i was using node 12.xx i upgraded to node 16 it's...
Read more >
Upgrade to Prisma 4
This section includes changes that affect both the Prisma Schema and the Prisma Client. Node.js minimum version change. From Prisma version 4.0.0, the...
Read more >
Prisma Client error: message is not defined · Issue #367
I have a fresh install of Postgres and for some reason I seem to have broken Prisma Studio. This is the errors I...
Read more >
How to upgrade to Prisma v4.0.0 - YouTube
In this livestream, the Prisma team walks you through the process of upgrading Prisma to v4.0.0 and gives practical examples of the expected ......
Read more >
How to use NestJS with Prisma
Prisma provides you with a declarative method for defining your ... Before we start building a Nest application, you need to install the ......
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