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.

[Example] gatsby-next broken since gatsby@2.3.23

See original GitHub issue

The gatsby-next example is no longer able to run since gatsby@2.3.23

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior ๐Ÿค”

yarn run develop should run without compiler issues

Current Behavior ๐Ÿ˜ฏ

$ yarn run develop
success open and validate gatsby-configs โ€” 0.004 s
success load plugins โ€” 0.133 s
success onPreInit โ€” 0.004 s
success initialize cache โ€” 0.006 s
success copy gatsby files โ€” 0.083 s
success onPreBootstrap โ€” 0.008 s
success source and transform nodes โ€” 0.019 s
success building schema โ€” 0.116 s
success createPages โ€” 0.001 s
success createPagesStatefully โ€” 0.077 s
success onPreExtractQueries โ€” 0.000 s
success update schema โ€” 0.026 s
success extract queries from components โ€” 0.022 s
success run graphql queries โ€” 0.014 s โ€” 7/7 576.29 queries/second
success write out page data โ€” 0.006 s
success write out redirect data โ€” 0.007 s
success onPostBootstrap โ€” 0.000 s

info bootstrap finished - 3.919 s

error There was an error compiling the html.js component for the development server.

See our docs page on debugging HTML builds for help https://gatsby.dev/debug-html

  18 | 
  19 |  const sheets = globalLeak.get(pathname);
> 20 |  setHeadComponents([sheets.getStyleElement()]);
     |                            ^
  21 |  globalLeak.delete(pathname);
  22 | };
  23 | 


  WebpackError: TypeError: Cannot read property 'getStyleElement' of undefined

  - gatsby-ssr.js:20 Module.onRenderBody
    lib/plugins/gatsby-plugin-material-ui/gatsby-ssr.js:20:28

  - api-runner-ssr.js:37
    lib/.cache/api-runner-ssr.js:37:39


  - api-runner-ssr.js:33 ./.cache/api-runner-ssr.js.module.exports
    lib/.cache/api-runner-ssr.js:33:25

  - develop-static-entry.js:80 Module../.cache/develop-static-entry.js.__webpack_exports__.default
    lib/.cache/develop-static-entry.js:80:12

  - bootstrap:24 Promise
    lib/webpack/bootstrap:24:1


  - develop-static-entry.js:30 Promise._resolveFromExecutor
    lib/.cache/develop-static-entry.js:30:7

  - bootstrap:68 new Promise
    lib/webpack/bootstrap:68:1


  - bootstrap:5 tryCatcher
    lib/webpack/bootstrap:5:1

  - bootstrap:50 MappingPromiseArray._promiseFulfilled
    lib/webpack/bootstrap:50:1

  - api-runner-ssr.js:6 MappingPromiseArray.PromiseArray._iterate
    lib/.cache/api-runner-ssr.js:6:27

  - bootstrap:67 MappingPromiseArray.init
    lib/webpack/bootstrap:67:1

  - bootstrap:19 MappingPromiseArray._asyncInit
    lib/webpack/bootstrap:19:1



error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Steps to Reproduce ๐Ÿ•น

Run the gatsby-next example

Your Environment ๐ŸŒŽ

Tech Version
Material-UI v4.0.0-alpha.8
React 16.8.6
Browser Chrome 74
TypeScript No

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
oliviertassinaricommented, Apr 18, 2019

The fix should be sent to https://github.com/hupe1980/gatsby-plugin-material-ui/blob/next/src/gatsby-ssr.js. Thanks!

Once the fix is released, we can use https://unpkg.com/gatsby-plugin-material-ui@2.0.0-alpha.4/ in the example we host here ๐Ÿ˜ƒ.

0reactions
oliviertassinaricommented, Apr 18, 2019

@TheHolyWaffle Thanks for the feedback. We can only document the alternative theme to start with ๐Ÿ˜ƒ

Read more comments on GitHub >

github_iconTop Results From Across the Web

async-requires.js relative includes broken since #18973 #19931
After the changes made in #18973, specifically these lines, my website no longer builds successfully. This is because async-requires.jsย ...
Read more >
Migrating from v2 to v3 - Gatsby
This section explains breaking changes that were made for Gatsby v3. Most, if not all, of those changes had a deprecation message in...
Read more >
Comparing Gatsby and Next.js for website development
Example of fetching data with Gatsby Graphql using gatsby-source-wordpress plugin ... Let's break a rule and start from Next.js first.
Read more >
Gatsby Changelog | 5.3.0
Install gatsby@next and let us know if you have any issues. Full changelog. Breaking Changes. If you're looking for an overview of all...
Read more >
Gatsby: The ultimate guide with examples - LogRocket Blog
After cloning this (click the Use Template button to create your own ... url: "https://github.com/gatsbyjs/gatsby/tree/master/examples",ย ...
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