question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot destructure property `inlineObjectId` of 'undefined' or 'null'.

See original GitHub issue

I’m receiving the following error when running yarn develop after adding gatsby-source-google-docs to my project:

TypeError: Cannot destructure property `inlineObjectId` of 'undefined' or 'null'.

  - converters.js:56 getImage
    [google-docs-test]/[gatsby-source-google-docs]/utils/converters.js:56:15

  - converters.js:130 getCover
    [google-docs-test]/[gatsby-source-google-docs]/utils/converters.js:130:38

  - converters.js:142 convertGoogleDocumentToJson
    [google-docs-test]/[gatsby-source-google-docs]/utils/converters.js:142:17

  - google-docs.js:43 google.docs.documents.get
    [google-docs-test]/[gatsby-source-google-docs]/utils/google-docs.js:43:15

  - apirequest.js:43 createAPIRequestAsync.then.r
    [google-docs-test]/[googleapis-common]/build/src/apirequest.js:43:53

  - next_tick.js:68 process._tickCallback
    internal/process/next_tick.js:68:7

I was able to successfully get an access token, my .google folder is at the root of my project, and my gatsby-config.json file is valid (pasted below)

module.exports = {
  siteMetadata: {
    title: `Gatsby Default Starter`,
    description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`,
    author: `@gatsbyjs`,
  },
  plugins: [
    `gatsby-plugin-react-helmet`,
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `images`,
        path: `${__dirname}/src/images`,
      },
    },
    `gatsby-transformer-sharp`,
    `gatsby-plugin-sharp`,
    {
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: `gatsby-starter-default`,
        short_name: `starter`,
        start_url: `/`,
        background_color: `#663399`,
        theme_color: `#663399`,
        display: `minimal-ui`,
        icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
      },
    },
    // this (optional) plugin enables Progressive Web App + Offline functionality
    // To learn more, visit: https://gatsby.dev/offline
    // `gatsby-plugin-offline`,
    "gatsby-source-google-docs",
    {
      resolve: "gatsby-transformer-remark",
      options: {
        plugins: ["gatsby-remark-images"],
      },
    },
  ],
}

I’m just trying to test this plugin with a dummy Google Doc in my GDrive, there’s no images in it, just lorem ipsum text.

Any possible solutions to this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
cedricdelpouxcommented, Apr 6, 2020

I’m aware of the warnings. I will remove them in the next beta release

1reaction
cedricdelpouxcommented, Apr 6, 2020

@linoxyn you should try query post: markdownRemark(frontmatter: {path: {eq: $path}}) { instead.

I updated the documentation

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot destructure property `queryResult` of 'undefined' or ...
Before destructure an object, please carefully check if it's undefined or null . const res = await soapRequest({ url: url, ...
Read more >
Google Oauth breaks - Cannot destructure property clientId of ...
Cannot destructure property `clientId` of 'undefined' or 'null'. {"stack":"TypeError: Cannot destructure property `clientId` of 'undefined' ...
Read more >
Basic object destructuring - Execute Program
TypeError : Cannot destructure property 'name' of 'undefined' as it is undefined. If the property doesn't exist in the object, we'll get undefined...
Read more >
TypeError: Cannot destructure property 'interface' of 'require ...
Cannot destructure property `interface` of 'undefined' or 'null'. How to solve this? 1 · TypeError: Cannot read property 'toNumber' of undefined.
Read more >
TypeError: Cannot destructure property `text` of 'undefined' or ...
my req.query is a null const {side} = req.query;
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found