Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error thrown during sourceNode lifecycle: "TypeError: value must be an array of bytes" #26

Open
city41 opened this issue Jul 13, 2019 · 0 comments

Comments

@city41
Copy link

city41 commented Jul 13, 2019

When the spreadsheet has an id column, gatsby develop emits this error:

15:55 $ gatsby develop
success open and validate gatsby-configs - 0.012 s
success load plugins - 0.225 s
success onPreInit - 0.057 s
success initialize cache - 0.004 s
success copy gatsby files - 0.009 s
success onPreBootstrap - 0.006 s
FETCHING SHEET function fetchData(_x2, _x3, _x4) {
    return _ref.apply(this, arguments);
  }

 ERROR #11321  PLUGIN

"gatsby-source-google-sheets" threw an error while running the sourceNodes lifecycle:

value must be an array of bytes



  TypeError: value must be an array of bytes
  
  - v35.js:29 generateUUID
    [fgbg]/[uuid]/lib/v35.js:29:38
  
  - gatsby-node.js:45 
    [fgbg]/[gatsby-source-google-sheets]/gatsby-node.js:45:21
  
  - Array.forEach
  
  - gatsby-node.js:43 _callee$
    [fgbg]/[gatsby-source-google-sheets]/gatsby-node.js:43:18
  
  
  - next_tick.js:189 process._tickCallback
    internal/process/next_tick.js:189:7
  

warn The gatsby-source-google-sheets plugin has generated no Gatsby nodes. Do you need it?

This is because the row objects have an id property, and it looks like the id column in the spreadsheet clobbers it. Removing the id column (I just made my column name more specific, in my case level-id) fixes the issue.

If you want, I could send in a PR where detect the presence of an id column and fail with a more descriptive/helpful error.

Thanks for this cool plugin!

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

No branches or pull requests

1 participant