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

Version 3 Fails with ‘UNHANDLED REJECTION createNodeId is not a function’ #125

Closed
jslauren opened this issue Oct 20, 2020 · 3 comments
Closed

Comments

@jslauren
Copy link

Example

package.json:

"dependencies": {
    "@deckdeckgo/highlight-code": "^2.1.0",
    "@material-ui/core": "^1.4.0",
    "@material-ui/icons": "^1.1.0",
    "babel-plugin-styled-components": "^1.11.1",
    "color": "^3.0.0",
    "gatsby": "^1.9.274",
    "gatsby-image": "^1.0.55",
    "gatsby-link": "^1.6.46",
    "gatsby-plugin-algolia": "^0.12.1",
    "gatsby-plugin-catch-links": "^1.0.26",
    "gatsby-plugin-dark-mode": "^1.1.2",
    "gatsby-plugin-feed": "^1.3.25",
    "gatsby-plugin-google-analytics": "^1.0.31",
    "gatsby-plugin-jss": "^1.5.14",
    "gatsby-plugin-manifest": "^1.0.27",
    "gatsby-plugin-netlify": "^1.0.21",
    "gatsby-plugin-offline": "^1.0.18",
    "gatsby-plugin-react-helmet": "^2.0.11",
    "gatsby-plugin-react-next": "^1.0.11",
    "gatsby-plugin-react-svg": "^1.1.1",
    "gatsby-plugin-sharp": "^1.6.48",
    "gatsby-plugin-sitemap": "^1.2.25",
    "gatsby-plugin-styled-components": "^3.3.14",
    "gatsby-remark-component": "^1.1.3",
    "gatsby-remark-copy-linked-files": "^1.5.37",
    "gatsby-remark-external-links": "^0.0.4",
    "gatsby-remark-images": "^1.5.67",
    "gatsby-remark-prismjs": "^2.0.5",
    "gatsby-remark-responsive-iframe": "^1.4.20",
    "gatsby-remark-smartypants": "^1.4.12",
    "gatsby-remark-vscode": "^3.1.0",
    "gatsby-source-filesystem": "^1.5.39",
    "gatsby-transformer-remark": "^1.7.44",
    "gatsby-transformer-sharp": "^1.6.27",
    "hoek": "^5.0.3",
    "instantsearch.css": "^7.1.0",
    "prismjs": "^1.15.0",
    "react-custom-scrollbars": "^4.2.1",
    "react-facebook": "^5.0.3",
    "react-headroom": "^2.2.2",
    "react-helmet": "^5.1.3",
    "react-instantsearch": "^5.2.2",
    "react-lazyload": "^2.3.0",
    "react-loadable-visibility": "^2.5.0",
    "react-material-ui-form-validator": "^2.0.1",
    "react-obfuscate": "^2.1.4",
    "react-popper": "0.10.4",
    "react-redux": "^5.0.6",
    "react-share": "^2.2.0",
    "rebound": "^0.1.0",
    "redux": "^4.0.0",
    "redux-devtools-extension": "^2.13.5",
    "screenfull": "^3.3.2",
    "styled-components": "^5.2.0",
    "use-dark-mode": "^2.3.1"
  }

gatsby-config.js:

    {
      resolve: `gatsby-transformer-remark`,
      options: {
        plugins: [
          {
            resolve: `gatsby-remark-vscode`,
            options: {
              theme: 'Abyss' // Or install your favorite theme from GitHub
            }
          },
          `gatsby-plugin-sharp`,
          {
            resolve: `gatsby-remark-images`,
            options: {
              maxWidth: 800,
              backgroundColor: "transparent"
            }
          },
          {
            resolve: `gatsby-remark-responsive-iframe`,
            options: {
              wrapperStyle: `margin-bottom: 2em`
            }
          },
          `gatsby-remark-prismjs`,
          `gatsby-remark-copy-linked-files`,
          `gatsby-remark-smartypants`
        ]
      }
    },

Error

➜  blog git:(master) ✗ gatsby develop
...
 ERROR

UNHANDLED REJECTION createNodeId is not a function



  TypeError: createNodeId is not a function

  - index.js:172 codeNodeRegistry.forEachCodeBlock
    [blog]/[gatsby-remark-vscode]/src/index.js:172:13

  - Map.forEach

  - index.js:155 textmateHighlight
    [blog]/[gatsby-remark-vscode]/src/index.js:155:22
@andrewbranch
Copy link
Owner

I think the problem is you’re using gatsby v1, which is super old now. Are you able to upgrade to the latest gatsby?

@andrewbranch
Copy link
Owner

The lowest version that works for me is gatsby@2.12. I’ve added that range as a peerDependency.

@jslauren
Copy link
Author

jslauren commented Nov 1, 2020

The lowest version that works for me is gatsby@2.12. I’ve added that range as a peerDependency.

Thank you for the reply.
I will apply it !

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

2 participants