Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Graphcool export: Cannot read property 'id' of undefined #560

Open
ejoebstl opened this issue Oct 3, 2018 · 2 comments
Open

Graphcool export: Cannot read property 'id' of undefined #560

ejoebstl opened this issue Oct 3, 2018 · 2 comments

Comments

@ejoebstl
Copy link

ejoebstl commented Oct 3, 2018

When attempting to export a project's data using the graphcool CLI, an uncaught error is thrown:

Please find the output (debug enabled) attached.

graphcool export --target=eu-west-1/cisxzoyjw0jif0141d3fu7kss
  config CWD /home/emi/Projects/authory.net/gc_backup +0ms
  config HOME /home/emi +1ms
  config definitionDir /home/emi/Projects/authory.net/gc_backup +1ms
  config definitionPath null +0ms
  config homepath /home/emi/.graphcoolrc +0ms
  config localRCPath /home/emi/Projects/authory.net/gc_backup/.graphcoolrc +0ms
  config globalRCPath /home/emi/.graphcoolrc +0ms
  cli command id export +0ms
  cli:plugincache Got plugin from cache +0ms
  cli:plugincache /home/emi/.cache/graphcool/plugins.json +0ms
  cli:plugincache Got plugin from cache +1ms
  cli:plugincache /home/emi/.cache/graphcool/plugins.json +0ms
  plugins findCommand graphcool-cli-core +0ms
  plugin requiring command +0ms
  cli-engine:plugins:manager requiring /usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-core +0ms
  cli-engine:plugins:manager required +378ms
  plugin required command +380ms
  EnvironmentMigrator graphcoolPath /home/emi/.graphcool does not exist +0ms
TypeError: Cannot read property 'id' of undefined
    at Export.<anonymous> (/usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-core/src/commands/export/index.ts:31:52)
    at step (/usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-core/dist/commands/export/index.js:42:23)
    at Object.next (/usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-core/dist/commands/export/index.js:23:53)
    at fulfilled (/usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-core/dist/commands/export/index.js:14:58)
    at <anonymous>
Exiting with code: 1

Expected behavior:

Should not crash.

@ejoebstl ejoebstl changed the title Graphcool export is crashing Graphcool export: Cannot read property 'id' of undefined Oct 3, 2018
@baerrach
Copy link

Do you have a graphcool.yml and maybe types.graphql in that directory?

We were getting the same error when the only files in the directory were the .graphqlrc file defining the server. By putting in the other files it magically started working.

@tyholby
Copy link

tyholby commented May 22, 2019

@ejoebstl I know I'm stupid for making this mistake, but I just got this error by running the graphcool export command in my frontend repo instead of my graphcool backend repo.. haha. Maybe that will help, maybe not.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants