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.

Failed to 'gatsby develop' after installing typography plugin

See original GitHub issue

Description

Failed to ‘gatsby develop’ after installing typography plugin when following gatsyby tutorial(https://www.gatsbyjs.org/tutorial/part-three/)

Steps to reproduce

Literally, I followed exact steps on the gatsby tutorial and up until part-two it was all working fine. But once I did this step(https://www.gatsbyjs.org/tutorial/part-three/#-install-and-configure-gatsby-plugin-typography) it gave me error.

Actual result

  gatsby develop
success open and validate gatsby-configs - 0.035s
success load plugins - 0.082s
success onPreInit - 0.002s
info One or more of your plugins have changed since the last time you ran Gatsby. As
a precaution, we're deleting your site's cache to ensure there's no stale data.
success initialize cache - 0.024s
success copy gatsby files - 0.070s
success onPreBootstrap - 0.010s
success createSchemaCustomization - 0.002s
success source and transform nodes - 0.036s
success building schema - 0.197s
success createPages - 0.001s
success createPagesStatefully - 0.043s
success onPreExtractQueries - 0.001s
success update schema - 0.024s
success extract queries from components - 0.049s
success write out requires - 0.009s
success write out redirect data - 0.002s
success onPostBootstrap - 0.001s
⠀
info bootstrap finished - 4.088 s
⠀
success run queries - 0.024s - 2/2 83.41/s

 ERROR #98123  WEBPACK

Generating SSR bundle failed

Can't resolve '/Users/benho/anvil-gatsby/src/utils/typography' in '/Users/benho/anvil-gatsby/node_modules/gatsby-plugin-typography/.cache'

File: node_modules/gatsby-plugin-typography/.cache/typography.js

Environment

System:
    OS: macOS 10.15.1
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
    Yarn: 1.19.1 - /usr/local/bin/yarn
    npm: 6.13.2 - ~/.nvm/versions/node/v10.15.3/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 79.0.3945.79
    Safari: 13.0.3
  npmPackages:
    gatsby: ^2.18.12 => 2.18.12
    gatsby-plugin-typography: ^2.3.20 => 2.3.20
  npmGlobalPackages:
    gatsby-cli: 2.8.20

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
skcelecommented, Jan 8, 2020

I also ran into issues after installing this step, but had a different set of errors:

gatsby develop

 ERROR 

The above error occurred in the <StoreStateProvider> component:
    in StoreStateProvider
    in App

React will try to recreate this component tree from scratch using the error boundary you provided, App.


 ERROR 

Warning: App: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.


 ERROR 

UNHANDLED REJECTION Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.



  Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
  1. You might have mismatching versions of React and the renderer (such as React DOM)
  2. You might be breaking the Rules of Hooks
  3. You might have more than one copy of React in the same app
  See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.
  
  - react.development.js:1590 resolveDispatcher
    [tutorial-part-three]/[gatsby]/[react]/cjs/react.development.js:1590:13
  
  - react.development.js:1618 useState
    [tutorial-part-three]/[gatsby]/[react]/cjs/react.development.js:1618:20
  
  - context.js:17 StoreStateProvider
    [tutorial-part-three]/[gatsby]/[gatsby-cli]/lib/reporter/loggers/ink/context.js:17:41
  
  - react-reconciler.development.js:6036 renderWithHooks
    [tutorial-part-three]/[react-reconciler]/cjs/react-reconciler.development.js:6036:18
  
  - react-reconciler.development.js:8570 mountIndeterminateComponent
    [tutorial-part-three]/[react-reconciler]/cjs/react-reconciler.development.js:8570:13
  
  - react-reconciler.development.js:9938 beginWork$1
    [tutorial-part-three]/[react-reconciler]/cjs/react-reconciler.development.js:9938:16
  
  - react-reconciler.development.js:11563 Object.invokeGuardedCallbackImpl
    [tutorial-part-three]/[react-reconciler]/cjs/react-reconciler.development.js:11563:10
  
  - react-reconciler.development.js:11740 invokeGuardedCallback
    [tutorial-part-three]/[react-reconciler]/cjs/react-reconciler.development.js:11740:31
  
  - react-reconciler.development.js:15778 beginWork$$1
    [tutorial-part-three]/[react-reconciler]/cjs/react-reconciler.development.js:15778:7
  
  - react-reconciler.development.js:14696 performUnitOfWork
    [tutorial-part-three]/[react-reconciler]/cjs/react-reconciler.development.js:14696:12
6reactions
LekoArtscommented, Jan 20, 2020

Thank you for opening this!

Please see this issue: https://github.com/gatsbyjs/gatsby/issues/19064 npm is messing up your dependency tree. Another run of npm install (and removal of node_modules beforehand) should fix your issue.

core-js ^2.* which is deprecated and not secure.

We’ll upgrade soon. In the meantime you don’t have to fear any security issues.

So the Gatsby tutorial currently offers buggy solution 😦

Have a look at the solutions in the mentioned issue, then it’ll work 😃

We’re marking this issue as answered and closing it for now but please feel free to comment here if you would like to continue this discussion. We also recommend heading over to our communities if you have questions that are not bug reports or feature requests. We hope we managed to help and thank you for using Gatsby!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Common Errors - Gatsby
If you encounter a webpack error that says Generating SSR bundle failed after installing a plugin and trying to run gatsby develop or...
Read more >
Gatsby develop command is producing an error - Stack Overflow
Since the error is specifically saying its not able to access environment master, I created a development environment, which doesn't seem to ...
Read more >
Gatsby Changelog | 5.3.0
In PR #36623 we fixed this behavior and any node changes (either by changing local files or through webhook updates) will be reflected...
Read more >
gatsby-plugin-mdx - npm
After installing gatsby-plugin-mdx you can add it to your plugins list ... Note: You should restart gatsby develop to update imports in MDX ......
Read more >
Getting to know Gatsby. It wasn't without hurdles | Nerd For Tech
Gatsby is a react-based framework for creating the statically generated websites and ... error “gatsby-plugin-webfonts” threw an error while running the ...
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