-
Notifications
You must be signed in to change notification settings - Fork 860
Prisma deploy doesn't generate files on windows #2494
Comments
Thanks for the bug report! It looks like the problem is that We'll update this soon! |
The latest boilerplate is using |
The problem is that |
What is incorrect in there? Is there something I can change that will make this work? |
To clarify, when I run
but no files are generated. |
Sorry for the confusion, the code generation for prisma-binding 2.0 works slightly differently as it's not using the You basically need to update your prisma.yml # ... other properties
hooks:
post-deploy:
- graphql get-schema
- graphql codegen .graphqlconfig.yml projects:
myapp:
schemaPath: src/generated/prisma.graphql
extensions:
prisma: prisma/prisma.yml
codegen:
- generator: prisma-binding
language: typescript
output:
binding: src/generated/prisma.ts Let me know if you have any further questions 🙌 You can also find more info in the docs here. |
@nikolasburk |
Hmm, I see. In that case I'm reopening the issue for someone to look into that specific case. Thanks @yocheved 🙏 |
@yocheved can you provide reproduction repositories for both cases? 🙂 |
I was able to reproduce this directly from the typescript-basic boilerplate. |
Yes @blocka, I also was able to reproduce, but we adjusted the typescript-basic boilerplate since you reported the error 🙂 Can you still reproduce the issue? |
Sorry for the delay, |
i have the same problem :( |
I believe prisma deploy is not running |
@marktani This problem still persists after latest upgrades to boilerplate projects:
Getting the following warnings Basically that leaves us not being able to migrate to 1.7+ right now. .graphqlconfig:
prisma.yml
folder structure: |
Thanks for your feedback @ntziolis! Can you share your |
@marktani Was in the rpocess of updating my post |
Does it work if you run |
The issue was as suggested I will provide an update once I figure out how to remove the dep to |
Basically im out of ideas. My initial report that I was able to create the file after removing the prepare lib was FALSE. All it did was remove the error message. still no prisma.ts though. Here is is a step by step to understand what changes when:
|
I have taken some time to summarize this issue as I think this are multiple:
Summary |
Thanks for the summary, @ntziolis. We will work on this issue soon! 🙂 One note, Neither is tied to the |
Thank you for the workaround. |
When you create a release it should be published to npm at the same time as part of your deployment process always |
Yes, we're setting up an automatic publishing flow as you suggested 🙂 |
I still get the error message, but everything worked well. I'm on Windows 10 Here the error message Romsy@ROMSY-PC MINGW64
$ prisma deploy
Deploying service `default` to stage `default` to server `default` 48ms
Service is already up to date.
post-deploy:
warning command prepare both exists in plugin pathsomewhere\node_modules\graphql-cli-prepare and is shipped with the graphql-cli.
The plugin is being ignored.
Running graphql get-schema --project database...
project database - No changes
Running graphql get-schema --project database √
warning command prepare both exists in plugin pathsomewhere\node_modules\graphql-cli-prepare and is shipped with the graphql-cli.
The plugin is being ignored.
Running graphql codegen √ Here's my dep and devDep "dependencies": {
"bcryptjs": "2.4.3",
"graphql-yoga": "1.14.10",
"jsonwebtoken": "8.3.0",
"prisma-binding": "2.1.0"
},
"devDependencies": {
"@types/bcryptjs": "2.4.1",
"dotenv-cli": "1.4.0",
"graphql-cli": "2.16.3",
"nodemon": "1.17.5",
"npm-run-all": "4.1.3",
"prisma": "1.10.2",
"rimraf": "2.6.2",
"ts-node": "6.2.0",
"typescript": "2.9.2"
} |
@rohmanhm I also get that warning but it everything still works as expected |
I am still getting this with prisma 1.15.3 & graphql-cli 2.16.5 on OSX. If I run
but If I run it generates it, fine. .graphqlconfig.yml:
server/api/database/prisma.yml:
|
I managed to get it to work right by installing graphql "^0.13.0", instead of "^0.14.0". |
Same for me. It works when I change the grapqhl version |
cannot get it to work even when downgrading graphql version as suggested |
i can confirm version 0.14.0 is not working to generate schema |
I also have the same problem, running on "graphql": "^0.13.2" |
I think i found a working solution (works with graphql: v14) add this to your prisma.yml file hooks:
post-deploy:
- graphql get-schema -p prisma
- prisma generate
generate:
- generator: graphql-schema
output: ./src/generated/ |
I'm following the GraphQL tutorial from How To GraphQL and when I run Output as follows:
I tried to change the post deploy code in config file in different ways but nothing seemed to work. Even simple echo messages are not being executed. I also tried adding a silent command to create a file but even that wasn't executed. My observation is that this is a scripting issue and the arguments are not properly passed to Workaround is to run My environment and version is latest, created and fetched/installed today. |
I get this issue too. |
@saifali96 Have you tried with |
@rohmanhm nice idea, I changed my laptop and almost forgot about mingw. Thanks I'll use that. Cheers! |
Did using git bash work for you @saifali96? I'm having the same problem, thought I had it working but now I'm just getting same output as you had in cmd and git bash. |
@SeanK1191 no. Unfortunately it doesn't work with For now, only workaround is to run the command yourself in the terminal. |
Can any one of you please create a new issue for this? It is easily possible for newer comments on closed issues to be missed 🙏 Thanks! |
@divyenduz I believe issue #3491 is the same or related to the issue mentioned here. @saifali96 I'm also doing the HowToGraphQL tutorial, gonna remove the post hook and use this npm script for now, hope it helps:
|
@SeanK1191 I tried using the above script in the My observation is #3491 should fix it. |
Thanks all for reporting this, in the mean time we will downgrade |
Until this is released, if you use
|
This is already available in the latest beta, please install it via |
you are amazing. |
Changing |
I have the same issue. I'm working on ubuntu 18.10 The output is: but the generated file is never updated. I have followed all the steps in this thread. |
If anybody is still having trouble adding
|
Bug Report
Current behavior
prisma deploy
is not generating filesReproduction
prisma deploy
Expected behavior?
Should see generated files again
The text was updated successfully, but these errors were encountered: