graphql-boilerplates/node-graphql-server

Cannot read property 'getDeployEndpoint' of undefined

Illuday opened this issue · 6 comments

UBUNTU 16.04 with graphcool@beta && graphql-cli@beta - tested with (git clone && graphql create) :

  • node-graphql-server/advanced
  • typescript-graphql-server/basic
  • typescript-graphql-server/advanced

Error when graphql deploy to local cluster [yarn start / npm start is working] :

graphcool deploy
config CWD /home/manu/Project/node-graphql-server/advanced +0ms
config HOME /home/manu +1ms
config definitionDir /home/manu/Project/node-graphql-server/advanced +1ms
config definitionPath /home/manu/Project/node-graphql-server/advanced/graphcool.yml +0ms
cli command id deploy +0ms
cli:plugincache Got plugin from cache +0ms
cli:plugincache /home/manu/.cache/graphcool/plugins.json +0ms
cli:plugincache Got plugin from cache +1ms
cli:plugincache /home/manu/.cache/graphcool/plugins.json +0ms
plugins findCommand graphcool-cli-core +0ms
plugin requiring command +0ms
cli-engine:plugins:manager requiring /home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-core +0ms
cli-engine:plugins:manager required +237ms
plugin required command +239ms
deploy run +0ms
?

Please choose the cluster you want to deploy "graphql-boilerplate@dev" to

TypeError: Cannot read property 'getDeployEndpoint' of undefined
at Client.get [as client] (/home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-engine/src/Client/Client.ts:132:29)
at Client. (/home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-engine/src/Client/Client.ts:383:40)
at step (/home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-engine/dist/Client/Client.js:32:23)
at Object.next (/home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-engine/dist/Client/Client.js:13:53)
at /home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-engine/dist/Client/Client.js:7:71
at __awaiter (/home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-engine/dist/Client/Client.js:3:12)
at Client.listProjects (/home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-engine/dist/Client/Client.js:293:16)
at Deploy. (/home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-core/src/commands/deploy/index.ts:216:40)
at step (/home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-core/dist/commands/deploy/index.js:42:23)
at Object.next (/home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-core/dist/commands/deploy/index.js:23:53)
at /home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-core/dist/commands/deploy/index.js:17:71
at __awaiter (/home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-core/dist/commands/deploy/index.js:13:12)
at Deploy.projectExists (/home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-core/dist/commands/deploy/index.js:208:16)
at Deploy. (/home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-core/src/commands/deploy/index.ts:160:21)
at step (/home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-core/dist/commands/deploy/index.js:42:23)
at Object.next (/home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-core/dist/commands/deploy/index.js:23:53)
at fulfilled (/home/manu/.nvm/versions/node/v7.10.1/lib/node_modules/graphcool/node_modules/graphcool-cli-core/dist/commands/deploy/index.js:14:58)
Exiting with code: 1

I also get this when I use graphql create :

├─┬ apollo-server-express@1.3.2
│ │ ├─┬ apollo-server-core@1.3.2
│ │ │ ├─┬ apollo-cache-control@0.0.7
│ │ │ │ └── UNMET PEER DEPENDENCY graphql@^0.10.0 || ^0.11.0
│ │ │ ├─┬ apollo-tracing@0.1.1
│ │ │ │ └── UNMET PEER DEPENDENCY graphql@^0.10.0 || ^0.11.0
│ │ │ ├── UNMET PEER DEPENDENCY graphql@^0.10.0 || ^0.11.0

same issue here..

Could you run mkdir ~/.graphcool and try again? 🙂

I've no ~/.graphcool folder.

Locate cache.yml doesn't give any answer.

After updating my graphcool@beta && graphql-cli@beta I havn't this anymore. Got another error. I'll open a new issue after some discussions.

By the way, you can install npm install -g graphql-cli, instead of graphql-cli@beta 🙂

Thanks for reporting @Illuday, this will be fixed in the next beta release 🙂
See https://github.com/graphcool/framework/issues/1477 for more information.