Hey everybody, when executing a prisma deploy with...
# orm-help
p
Hey everybody, when executing a prisma deploy with the post deployment hooks mentioned in the upgrade guide, I receive the following error:
n
can you share your
.graphqlconfig.yml
?
p
Of course:
Copy code
projects:
  app:
    schemaPath: src/schema.graphql
    extensions:
      endpoints:
        default: <http://localhost:4000>
  database:
    schemaPath: src/generated/prisma.graphql
    extensions:
      prisma: database/prisma.yml
      prepare-binding:
        output: src/generated/prisma.js
        generator: prisma-js
      endpoints:
        default:
          url: ${env:PRISMA_ENDPOINT}
          headers:
            Authorization: "Bearer ${env:PRISMA_TOKEN}"
Absolutely basic.
n
you probably don't have write permissions for
src/generated/prisma.graphql
.
p
Thats possible. I'll quickly change the file properties and try it again.
Okay I changed the file permissions and even deleted the file completely. I still get the same error message. I'm running it on Ubuntu 16.04 64bit. The folder with the project is within my ~ (home) directory.
(adding that into the thread)
it's a file permission error 🙂
p
I thought so, now I just need to find out, how to fix this. Thank you! 🙂
n
first of all check the current file permissions using
ls -al
.
p
Okay, after deleting the generated folder completely and trying
prisma deploy
again I see that the "generated" folder is not even being created.
My user obviously has the rights, to create, edit and delete files in that folder.
Are the post deployment hooks executed by another user?
@nilan Debug returned the following more extensive error message:
Copy code
Error: spawn EACCES
    at _errnoException (util.js:1022:11)
    at ChildProcess.spawn (internal/child_process.js:323:11)
    at Object.exports.spawn (child_process.js:502:9)
    at spawn (/usr/lib/node_modules/prisma/node_modules/cross-spawn/index.js:17:18)
    at /usr/lib/node_modules/prisma/node_modules/prisma-cli-core/src/spawn.ts:11:16
    at new Promise (<anonymous>)
    at Object.spawn (/usr/lib/node_modules/prisma/node_modules/prisma-cli-core/src/spawn.ts:9:10)
    at Deploy.<anonymous> (/usr/lib/node_modules/prisma/node_modules/prisma-cli-core/src/commands/deploy/index.ts:443:28)
    at step (/usr/lib/node_modules/prisma/node_modules/prisma-cli-core/dist/commands/deploy/index.js:42:23)
    at Object.next (/usr/lib/node_modules/prisma/node_modules/prisma-cli-core/dist/commands/deploy/index.js:23:53)
    at fulfilled (/usr/lib/node_modules/prisma/node_modules/prisma-cli-core/dist/commands/deploy/index.js:14:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
Exiting with code: 1
n
what happens if you run
graphql get-schema --project database
in the terminal?
p
I'm gonna try it, as soon as I'm back at my pc this evening! Thank you for your continuous help @nilan! 😄👍
@nilan re I get
Copy code
-bash: /usr/bin/graphql: Permission denied
Copy code
sudo chmod +x /usr/bin/graphql
fixes it
fast parrot 1
Thank you for your help Nilan! 😄
🙌 1