Prisma Client removed on adding a new package: Error: @prisma/client did not initialize yet #390
Comments
I can't reproduce this with |
I could reproduce this once today. But not anymore afterwards. I would love to keep this in the next sprint as I think it is important and try to find a reproduction. |
Tim has a reproduction of a different error of similar nature now. I will look for a related reproduction of the actual error "Photon is not initialized yet. Please run prisma2 generate again" but Tim can already start on the other bit of it. |
|
I created a reproduction attempt in https://github.com/timsuchanek/photonjs-390. But just an attempt. Unassigning myself until we have a reliable reproduction. |
I am also unfortunately unable to reproduce this. |
I am also unable to reproduce this with a local package like in Tim's repo. I tried that and its file variant (referring to prisma-client by its folder). |
Note: Update issue title and description to new output. |
There is prisma/prisma#2106 similar discussion going. I had similar issue, but it was my own fault adding UPDATE: false alarm, use |
I got this error |
Can you open a new issue pls @deadcoder0904? Thanks. |
I think I opened in wrong repo 🤦♂️ prisma/prisma#2963 |
All good. Thanks. |
@deadcoder0904 same here - exactly when I upgraded to "@prisma/client": "2.2.0" (which was necessary to fix a different bug within prisma up from 2.1.0) |
@nargetdev did you solve it? if not, here's the solution :) |
I am getting this error. Couldn't find any workarounds yet. My dependencies
|
@MichaelGorski You should remove your @prisma/cli and @prisma/client dependencies from your package.json and delete your node_modules (and yarn.lock if you use yarn) and install things fresh again. That being said, I'm getting the same error right now, even tho I don't have those in my package.json. |
Solved it My Solution: @sreuter Did you try my solution? It worked for me edit: grammar |
Thanks @MichaelGorski.. For me it was something else in case somebody still has problems: I had to remove |
Happens with pnpm 5.6 and node 14.8
even though the client is already generated doesn't work with yarn 1.22.5 either even tho the client exists:
|
@talentlessguy Client is not generated at that location now, please check |
@pantharshit00 there's this:
|
My environment is setup with a prisma2 directory and an apollo2 directory. The prisma directory is setup connected to MySQL. Commands invoked from the CLI write and read to/from the database. I am attempting to load Prisma Client for use in Apollo2. I am in the Apollo directory, and add the dependency for prisma client using the following:
I added the following code to my index.js for Apollo:
I get the following error:
No idea what this means, I wouldn't assume a dependency would need to be 'initialized', but I assume it's trying to build code from my schema. So I run
which points to my prisma schema I had setup previously, I'm assuming this is used to generate the client code. It completes without error. When invoking apollo, I get the same generate error. So I run the following:
How do I set this up so that Apollo can load in the PrismaClient? Dependencies:
|
Hi @jdevng! Your output here
looks like Prisma 1 output, to avoid this you could run npx like this |
If the above advise would have mentioned in the output, it would be more helpful. |
@srikanthkyatham It's something we want to improve indeed! 😃 |
Context for @samrith-s comment's #390 (comment) |
I had a chat with @ryands17 and he advised me to include |
@samrith-s in your case you could remove the |
@Jolg42 yeah I tried that. But I still need to manually pack the rhel-open-ssl binary with lambda which isn't done at all in the example. I have so much boilerplate code just to make the query engine available to Prisma, have no idea how it works in the SLS Lambda example here: https://www.prisma.io/docs/guides/deployment/deploying-to-aws-lambda |
@samrith-s Could you maybe create a new issue about that with your boilerplate code? |
Once I get to
Upon running prisma generate I receive |
Note: discussion from previous comment is there prisma/prisma#4978 |
This behavior can be observed in both
npm
andyarn
, setup a Photon project and run any query with photon to ensure that it exists.Now add any dependency in
yarn
,npm
and re-execute photon query. I reproduced this withyarn add dotenv
ornpm install dotenv
.It doesn't matter if
dotenv
is already install or is a new package. I could reproduce this reliably.You would run into (error paraphrased):
npm
:import { Photon } from '@prisma/photon'
no found.yarn
:Photon is not initialized yet. Please run prisma2 generate again
I used the following versions:
The text was updated successfully, but these errors were encountered: