-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with Prisma v15: can't find prisma.schema #824
Comments
Can you tell us a bit more about the steps you took to create your project so we can try to reproduce this? Did you create a new project with |
Ok, so I can reproduce the wrongly worded error message when I create a new project with
|
@CaptainChemist So now the question is, should you actually be getting the error message? Do you have a |
The latest alpha has a fix with the correct error message. |
All I did was upgrade from version 13.2 where it was working and I had a schema.prisma file located in the prisma folder. It's funny though because today I cannot reproduce this issue, so I am not exactly sure what it is. From what @timsuchanek is saying, the error message incorrectly was identifying the wrong file as missing, so perhaps my docker volumes were out of wack and even though my project had that file locally, perhaps it was missing in the docker container. I did notice that naming the file In any case, I'll close this for now. Thanks everyone! |
I'm having the exact same issue. The error message states "prisma.schema" instead of "schema.prisma". I think that's just a typo. But my installation can't find the schema.prisma file either when I use the following command (which is automatically run postinstall): cd libs/nest/api-photon && prisma2 generate |
Thought I'd mention, I installed the latest alpha and I still have the same issue as @CaptainChemist. The error message is fixed, but it still won't find the schema.prisma like it does in previous versions. |
@janpio, thought I'd share (since I'm having the same problem as @CaptainChemist), I did not start my project with prisma2 init. I started from an existing project. That might explain some things. I'm using an NX mono-repo. I'm guessing bet the path in the version 15 release changed? |
@ajmcclary Are you working in a dockerized or non-dockerized environment? Also you should try running |
@CaptainChemist, I just figured it out. They introduced a new environmental variable: process.env.INIT_CWD So that is why it couldn't find it. |
Also, thank you for the suggestion. I'm non-dockerized, but I'm using an Nx repo. So my directory structure is different than a normal installation. |
OMG, @CaptainChemist, I did what you mentioned (just to be safe) and it WAS showing an older version of Prisma2! I swear and I double and triple checked it before I posted my comment. As soon as I rebooted, the new version finally showed up. |
Ha computers will be the death of us all- I'm glad you have it working better now! |
I am facing the same issue when I am trying to deploy on Now.
My prisma2 version prisma2 -v
prisma2@2.0.0-preview015, binary version: 20b6dc13949cccccfef5be07c0be7a3d7c858abe I only get the error on Now during build > script@ postinstall /zeit/56e0d573/api
--
02:53:48 PM | > yarn -s generate
02:53:50 PM | Error: Can't find prisma.schema I was able to reproduce error many times. I did not create a new project from scratch, I updated an existing one. |
Note that my
without success |
Same problem here (works locally, but can't deploy to Now [or Heroku, for that matter]) |
Is your prisma directory located in a subdirectory as well? |
@poulainv , no, I am using the standard setup with |
Hi everyone, We have recently merged a PR fixing this issue but it is not available in a preview yet: #789 Can you please test this out using the alpha channel. |
My deployment to zeit now still fails. Here's the build log:
|
@iherger I think zeit now prepare the container by installing only packages. Try to remove the "postinstall" line from your (I got the same issue with my dockerfile) |
Thanks, @aifedespaix I am hesitant to make the changes you suggest because a) the repo would deploy to zeit now without any problems before and b) the "official" prisma2 zeit now deployment example also uses |
I'm having the same issue when deploying to Firebase functions. This was working fine in |
@timsuchanek , I tested with another repo, but https://github.com/iherger/prisma2-now actually also doesn't work (I just upgraded |
@iherger I just tried your repo and I can successfully deploy it https://prisma2-now.timsuchanek.now.sh/ |
@timsuchanek , nothing short of magic! I can deploy it locally, using Are you also using a postgresql database? |
Hmm interesting. I've kept the postgres env var empty, so it fails in runtime, but the error "Can't find prisma.schema" aka "Can't find schema.prisma" doesn't appear anymore. |
@timsuchanek so you are not using now secrets, if I unterstand you correctly, and everything elsr is the same as in the repo. Maybe it‘s got something to with those now secrets. I can test tomorrow, and will let you know my findings. |
On my side, this patch have fixed this issue |
@iherger were you able to still reproduce this? |
@pantharshit00 , yes, I am still able to reproduce it. What I found, though, is that it works if I use |
@pantharshit00 , I can now longer reproduce this with preview016. |
Perfect! Then I'll close this for now. In case you can reproduce it again, just let us know and we'll reopen. |
This error appears again in preview 18.2 |
Also getting this in the latest alpha - |
@pantharshit00 I'll be back in this code over the weekend and see if I can still repro the issue on the latest versions that have been released this week and report back. |
Prisma Trying to deploy to AWS Beanstalk, I get the following error: It happens during this phase:
Any ideas? |
@AviBueno Please open a new issue with a minimal reproduction. Thanks! |
@aputinski Did you manage to solved it? |
I'm having the same issue with Prisma 4.3.1 - when I run the command |
This is a closed issue, so there will be no more updates. If you still have this problem, please open a new issue and provide all the information the issue template asks for. Thanks. |
I updated to prisma version 15 and when I run prisma2 generate in a docker environment, I receive the error:
I don't see that the filename has been changed from
schema.prisma
toprisma.schema
so this seems like a bug.The text was updated successfully, but these errors were encountered: