2

Everything started after installing gatsby-source-contentful: ^2.3.42 => 2.3.43.

ERROR #98124 WEBPACK

Generating development JavaScript bundle failed Can't resolve 'history' in /Users/labanino/development/my-app/node_modules/gatsby-link If you're trying to use a package make sure that 'history' 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

ERROR #98124 WEBPACK

Generating development JavaScript bundle failed Can't resolve react-router-dom in /Users/labanino/development/my-app/node_modules/gatsby-link If you're trying to use a package make sure that react-router-dom 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 failed Building development bundle - 7.565s

This is my gatsby info

System:

OS: macOS 10.15.6
CPU: (8) x64 Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz
Shell: 5.7.1 - /bin/zsh

Binaries:

Node: 12.16.2 - /usr/local/bin/node
npm: 6.14.4 - /usr/local/bin/npm

Languages:

Python: 2.7.16 - /usr/bin/python

Browsers:

Chrome: 85.0.4183.102
Safari: 13.1.2

npmPackages:

gatsby: ^2.24.55 => 2.24.55
gatsby-link: ^1.6.40 => 1.6.46
gatsby-plugin-react-helmet: ^3.3.10 => 3.3.10
gatsby-source-contentful: ^2.3.42 => 2.3.43

npmGlobalPackages:

gatsby-cli: 2.12.93
Labanino
  • 3,902
  • 9
  • 33
  • 51
  • 2
    Seems like `gatsby-link` is trying to import `history`, but no such module exists. This is a situation that can probably be resolved by removing your `node_modules` folder and reinstalling dependencies, then running `gatsby clean` before re-running `gatsby develop`. – coreyward Sep 09 '20 at 17:24

1 Answers1

1

Update gatsby-link. in packages.json change:

gatsby-link: ^1.6.40 => 1.6.46

to

gatsby-link: ^2.4.13 => 2.4.13
apena
  • 2,091
  • 12
  • 19