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.

Can't resolve '@reach/router' in 'gatsby-link' and 'gatsby-react-router-scroll'

See original GitHub issue

Description

Migrated to gatsby 3, now running into this:

 ERROR #98124  WEBPACK

Generating development SSR bundle failed

Can't resolve '@reach/router' in
'/home/christoph/projects/codepunkt.de/node_modules/gatsby-link'

If you're trying to use a package make sure that '@reach/router' is installed. If
you're trying to use a local file make sure that the path is correct.

File: node_modules/gatsby-link/index.js:22:14


 ERROR #98124  WEBPACK

Generating development SSR bundle failed

Can't resolve '@reach/router' in
'/home/christoph/projects/codepunkt.de/node_modules/gatsby-react-router-scroll'

If you're trying to use a package make sure that '@reach/router' is installed. If
you're trying to use a local file make sure that the path is correct.

File: node_modules/gatsby-react-router-scroll/use-scroll-restoration.js:10:14

not finished Building development bundle - 4.058s

error Command failed with exit code 1.

Environment

  System:
    OS: Linux 5.4 Ubuntu 20.04.1 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 14.15.3 - ~/.nvm/versions/node/v14.15.3/bin/node
    Yarn: 1.22.5 - /usr/bin/yarn
    npm: 6.14.9 - ~/.nvm/versions/node/v14.15.3/bin/npm
  Browsers:
    Chrome: 87.0.4280.88
  npmPackages:
    gatsby: ^3.0.2 => 3.0.2
    gatsby-image: ^3.0.0 => 3.0.0
    gatsby-plugin-catch-links: ^3.0.0 => 3.0.0
    gatsby-plugin-feed: ^3.0.0 => 3.0.0
    gatsby-plugin-linaria: ^2.2.0 => 2.2.0
    gatsby-plugin-manifest: ^3.0.0 => 3.0.0
    gatsby-plugin-offline: ^4.0.0 => 4.0.0
    gatsby-plugin-react-helmet: ^4.0.0 => 4.0.0
    gatsby-plugin-remove-generator: ^1.0.8 => 1.0.8
    gatsby-plugin-robots-txt: ^1.5.5 => 1.5.5
    gatsby-plugin-sharp: ^3.0.0 => 3.0.0
    gatsby-plugin-sitemap: ^3.0.0 => 3.0.0
    gatsby-remark-acronyms: ^1.1.2 => 1.1.2
    gatsby-remark-autolink-headers: ^3.0.0 => 3.0.0
    gatsby-remark-copy-linked-files: ^3.0.0 => 3.0.0
    gatsby-remark-external-links: ^0.0.4 => 0.0.4
    gatsby-remark-images: ^4.0.0 => 4.0.0
    gatsby-remark-opengraph: 2.0.1 => 2.0.1
    gatsby-remark-table-of-contents: ^1.0.0 => 1.0.0
    gatsby-remark-vscode: ^3.2.0 => 3.2.0
    gatsby-source-filesystem: ^3.0.0 => 3.0.0
    gatsby-transformer-remark: ^3.0.0 => 3.0.0
    gatsby-transformer-sharp: ^3.0.0 => 3.0.0

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
rowanD72commented, Aug 24, 2021

I uninstalled Gatsby-link and reinstalled It again, problem solved. Gatsby-link is what is causing the error.

1reaction
LekoArtscommented, Mar 5, 2021

It’s the same issue, yeah. From our standpoint it’s not solved yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't resolve 'react-dom' in '/path/node_modules/gatsby-react ...
Try re-adding gatsby-react-router-scroll . npm install gatsby-react-router-scroll. You might want to run a gatsby clean first.
Read more >
Migrating from GatsbyJS 2.16.2 to 3.9.0 - BobbyDreamer
5Can't resolve '@reach/router/lib/utils' in 'D:\BigData\08. HTML\Gatsby\lupin\bdv3g3\gatsby-starter-minimal-blog\.cache'.
Read more >
@gatsbyjs/reach-router - npm
Gatsby's fork to modernize reach-router. Latest version: 2.0.0, last published: a month ago. Start using @gatsbyjs/reach-router in your ...
Read more >
Gatsby Changelog | 5.3.0
We are dropping support for Node 14 and 16 as our currently supported Node 14 version will reach EOL during the Gatsby 5...
Read more >
reach/router and Gatsby
The component is a wrapper around @reach/router's Link component that adds useful enhancements specific to Gatsby. Client and Server Routing. Besides using ...
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