syntra / gatsby-remark-social-cards

Gatsby remark plugin for generating social card graphics
MIT License
95 stars 17 forks source link

Error when trying to run `gatsby develop` #25

Open majagrubic opened 4 years ago

majagrubic commented 4 years ago

I am trying to add gatsby-remark-social-cards, by following instructions here.

I have just added a new plugin under gatsby-transformer-remark. But when I try to run gatsby develop, it fails on running GraphQL query with the following error:

Error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined.

Could you advise how the query should look like? I assume I need to add path somewhere in the frontmatter section of my existing query?

Full stack trace:

Error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined

  - validators.js:125 validateString
    internal/validators.js:125:11

  - index.js:110 module.exports
    [gatsby-starter-hero-blog]/[gatsby-remark-social-cards]/index.js:110:23

  - extend-node-type.js:247 Promise.each.plugin
    [gatsby-starter-hero-blog]/[gatsby-transformer-remark]/extend-node-type.js:247:30

  - util.js:16 tryCatcher
    [gatsby-starter-hero-blog]/[bluebird]/js/release/util.js:16:23

  - reduce.js:155 Object.gotValue
    [gatsby-starter-hero-blog]/[bluebird]/js/release/reduce.js:155:18

  - reduce.js:144 Object.gotAccum
    [gatsby-starter-hero-blog]/[bluebird]/js/release/reduce.js:144:25

  - util.js:16 Object.tryCatcher
    [gatsby-starter-hero-blog]/[bluebird]/js/release/util.js:16:23

  - promise.js:512 Promise._settlePromiseFromHandler
    [gatsby-starter-hero-blog]/[bluebird]/js/release/promise.js:512:31

  - promise.js:569 Promise._settlePromise
    [gatsby-starter-hero-blog]/[bluebird]/js/release/promise.js:569:18

  - promise.js:606 Promise._settlePromiseCtx
    [gatsby-starter-hero-blog]/[bluebird]/js/release/promise.js:606:10

  - async.js:138 Async._drainQueue
    [gatsby-starter-hero-blog]/[bluebird]/js/release/async.js:138:12

  - async.js:143 Async._drainQueues
    [gatsby-starter-hero-blog]/[bluebird]/js/release/async.js:143:10

  - async.js:17 Immediate.Async.drainQueues [as _onImmediate]
    [gatsby-starter-hero-blog]/[bluebird]/js/release/async.js:17:14
AriTheElk commented 4 years ago

I'd take a look at this thread that was closed recently: https://github.com/syntra/gatsby-remark-social-cards/issues/23#issuecomment-600837592

LMK if you're still having issues

majagrubic commented 4 years ago

Hi, Thanks for your reply. I had a look at the issue, and it seems I already have slugs configured: https://github.com/majagrubic/maggiesfitness/blob/master/gatsby-node.js#L19

I'm not sure what to do next.