sanity-io / sanity-template-gatsby-blog

A Sanity powered Gatsby blog for https://www.sanity.io/create
https://www.sanity.io/create?template=sanity-io/sanity-template-gatsby-blog
98 stars 34 forks source link

ERR! npm run graphql-deploy exited 1 in 'sanity-gatsby-blog-studio' #116

Open javierfuentesm opened 4 years ago

javierfuentesm commented 4 years ago

Im getting this error when executing lerna run graphql-deploy I can still run npm run dev , and it works but when I try to build-web or use graphql-deploy , or when i try to deploy in netlify i get the same error sanity-gatsby-blog@1.0.9 graphql-deploy /Users/rjfm/Documents/Cursos/Gospel-Doctrine

lerna run graphql-deploy

lerna notice cli v3.19.0 lerna info Executing command in 1 package: "npm run graphql-deploy" lerna ERR! npm run graphql-deploy exited 1 in 'sanity-gatsby-blog-studio' lerna ERR! npm run graphql-deploy stdout:

sanity-gatsby-blog-studio@1.0.6 graphql-deploy /Users/rjfm/Documents/Cursos/Gospel-Doctrine/studio npx sanity graphql deploy --playground

Dataset: production Tag: default

lerna ERR! npm run graphql-deploy stderr:

Error: Request returned HTTP 401 at ~/Documents/Cursos/Gospel-Doctrine/studio/node_modules/@sanity/core/lib/util/getUrlHeaders.js:30:21 at f (~/Documents/Cursos/Gospel-Doctrine/studio/node_modules/once/once.js:25:25) at ClientRequest. (~/Documents/Cursos/Gospel-Doctrine/studio/node_modules/simple-get/index.js:63:5) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sanity-gatsby-blog-studio@1.0.6 graphql-deploy: npx sanity graphql deploy --playground npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sanity-gatsby-blog-studio@1.0.6 graphql-deploy script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/rjfm/.npm/_logs/2020-06-05T21_42_07_644Z-debug.log

lerna ERR! npm run graphql-deploy exited 1 in 'sanity-gatsby-blog-studio' npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sanity-gatsby-blog@1.0.9 graphql-deploy: lerna run graphql-deploy npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sanity-gatsby-blog@1.0.9 graphql-deploy script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/rjfm/.npm/_logs/2020-06-05T21_42_07_670Z-debug.log El proceso del terminal finalizó con el código de salida: 1

This is the log 0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli '/usr/local/Cellar/node/13.7.0/bin/node', 1 verbose cli '/usr/local/bin/npm', 1 verbose cli 'run', 1 verbose cli 'graphql-deploy' 1 verbose cli ] 2 info using npm@6.14.5 3 info using node@v13.7.0 4 verbose run-script [ 'pregraphql-deploy', 'graphql-deploy', 'postgraphql-deploy' ] 5 info lifecycle sanity-gatsby-blog-studio@1.0.6~pregraphql-deploy: sanity-gatsby-blog-studio@1.0.6 6 info lifecycle sanity-gatsby-blog-studio@1.0.6~graphql-deploy: sanity-gatsby-blog-studio@1.0.6 7 verbose lifecycle sanity-gatsby-blog-studio@1.0.6~graphql-deploy: unsafe-perm in lifecycle true 8 verbose lifecycle sanity-gatsby-blog-studio@1.0.6~graphql-deploy: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/rjfm/Documents/Cursos/Gospel-Doctrine/studio/node_modules/.bin:/Users/rjfm/.rvm/gems/ruby-2.7.0/bin:/Users/rjfm/.rvm/gems/ruby-2.7.0@global/bin:/Users/rjfm/.rvm/rubies/ruby-2.7.0/bin:/usr/local/bin:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:/Users/rjfm/Library/Android/sdk/emulator:/Users/rjfm/Library/Android/sdk/tools:/Users/rjfm/Library/Android/sdk/tools/bin:/Users/rjfm/Library/Android/sdk/platform-tools:/Users/rjfm/.rvm/bin 9 verbose lifecycle sanity-gatsby-blog-studio@1.0.6~graphql-deploy: CWD: /Users/rjfm/Documents/Cursos/Gospel-Doctrine/studio 10 silly lifecycle sanity-gatsby-blog-studio@1.0.6~graphql-deploy: Args: [ '-c', 'npx sanity graphql deploy --playground' ] 11 silly lifecycle sanity-gatsby-blog-studio@1.0.6~graphql-deploy: Returned: code: 1 signal: null 12 info lifecycle sanity-gatsby-blog-studio@1.0.6~graphql-deploy: Failed to exec graphql-deploy script 13 verbose stack Error: sanity-gatsby-blog-studio@1.0.6 graphql-deploy:npx sanity graphql deploy --playground 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:321:20) 13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:321:20) 13 verbose stack at maybeClose (internal/child_process.js:1026:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) 14 verbose pkgid sanity-gatsby-blog-studio@1.0.6 15 verbose cwd /Users/rjfm/Documents/Cursos/Gospel-Doctrine/studio 16 verbose Darwin 19.4.0 17 verbose argv "/usr/local/Cellar/node/13.7.0/bin/node" "/usr/local/bin/npm" "run" "graphql-deploy" 18 verbose node v13.7.0 19 verbose npm v6.14.5 20 error code ELIFECYCLE 21 error errno 1 22 error sanity-gatsby-blog-studio@1.0.6 graphql-deploy:npx sanity graphql deploy --playground 22 error Exit status 1 23 error Failed at the sanity-gatsby-blog-studio@1.0.6 graphql-deploy script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

magic8baller commented 4 years ago

I am also having issues with graphql deploy command! I tried on @sanity/cli 1.149.13 and v 1.149.16, no difference for both either running local sanity command or from the studio pkg ` ✔ Checking for deployed API ✔ Generating GraphQL schema ✖ Validating GraphQL API

s: Internal Server Error - An internal server error occurred at onResponse (~/dev/gatsby-blog/studio/node_modules/@sanity/cli/bin/sanity-cli.js:4540:497) at ~/dev/gatsby-blog/studio/node_modules/@sanity/cli/bin/sanity-cli.js:2844:279 at ~/dev/gatsby-blog/studio/node_modules/@sanity/cli/bin/sanity-cli.js:2832:918 at ~/dev/gatsby-blog/studio/node_modules/@sanity/cli/bin/sanity-cli.js:2832:1026 at E (~/dev/gatsby-blog/studio/node_modules/@sanity/cli/bin/sanity-cli.js:2880:1333) at ~/dev/gatsby-blog/studio/node_modules/@sanity/cli/bin/sanity-cli.js:2880:2846 at s. (~/dev/gatsby-blog/studio/node_modules/@sanity/cli/bin/sanity-cli.js:1572:184) at A (~/dev/gatsby-blog/studio/node_modules/@sanity/cli/bin/sanity-cli.js:1590:6030) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sanity-gatsby-blog-studio@1.0.8 graphql-deploy: sanity graphql deploy --playground npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sanity-gatsby-blog-studio@1.0.8 graphql-deploy script. `

thulini commented 4 years ago

I'm getting the same above error any luck in resolving?