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

Gatsby 3 migration: Cannot find module 'babel-preset-gatsby' #30110

Closed
mrkaluzny opened this issue Mar 8, 2021 · 4 comments
Closed

Gatsby 3 migration: Cannot find module 'babel-preset-gatsby' #30110

mrkaluzny opened this issue Mar 8, 2021 · 4 comments
Labels
status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. type: bug An issue or pull request relating to a bug in Gatsby

Comments

@mrkaluzny
Copy link
Contributor

Description

While migrating to Gatsby v3 from v2 I'm getting an error 'Cannot find module 'babel-preset-gatsby''. I'm pretty sure it's a plugin issue just not sure what I should change any help would be appreciated!

Expected result

Development server should start.

Actual result

Build errrors on all pages

Environment


  System:
    OS: macOS 11.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.15.4 - ~/.nvm/versions/node/v14.15.4/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v14.15.4/bin/yarn
    npm: 6.14.10 - ~/.nvm/versions/node/v14.15.4/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 88.0.4324.192
    Safari: 14.0.2
  npmPackages:
    gatsby: ^3.0.3 => 3.0.3 
    gatsby-cli: ^3.0.0 => 3.0.0 
    gatsby-image: ^3.0.0 => 3.0.0 
    gatsby-plugin-advanced-sitemap: ^1.6.0 => 1.6.0 
    gatsby-plugin-apollo: ^3.0.2 => 3.0.2 
    gatsby-plugin-apollo-shopify: ^1.1.0 => 1.1.0 
    gatsby-plugin-brotli: ^2.0.0 => 2.0.0 
    gatsby-plugin-google-tagmanager: ^3.0.0 => 3.0.0 
    gatsby-plugin-layout: ^2.0.0 => 2.0.0 
    gatsby-plugin-manifest: ^3.0.0 => 3.0.0 
    gatsby-plugin-modal-routing: ^1.2.0 => 1.2.0 
    gatsby-plugin-offline: ^4.0.0 => 4.0.0 
    gatsby-plugin-preload-fonts: ^2.0.0 => 2.0.0 
    gatsby-plugin-purgecss: ^6.0.0 => 6.0.0 
    gatsby-plugin-react-helmet: ^4.0.0 => 4.0.0 
    gatsby-plugin-root-import: ^2.0.6 => 2.0.6 
    gatsby-plugin-sass: ^4.0.2 => 4.0.2 
    gatsby-plugin-sharp: ^3.0.0 => 3.0.0 
    gatsby-plugin-shopify-buy: 0.0.2 => 0.0.2 
    gatsby-plugin-webpack-bundle-analyser-v2: ^1.1.18 => 1.1.20 
    gatsby-query-params: ^1.2.1 => 1.2.1 
    gatsby-remark-images: ^4.0.0 => 4.0.0 
    gatsby-remark-images-zoom: ^1.1.0 => 1.1.0 
    gatsby-remark-relative-images: ^2.0.2 => 2.0.2 
    gatsby-source-filesystem: ^3.0.0 => 3.0.0 
    gatsby-source-graphql: ^3.0.0 => 3.0.0 
    gatsby-source-shopify: ^4.0.0 => 4.0.0 
    gatsby-transformer-remark: ^3.0.0 => 3.0.0 
    gatsby-transformer-sharp: ^3.0.0 => 3.0.0 
  npmGlobalPackages:
    gatsby-cli: 2.17.0
@mrkaluzny mrkaluzny added the type: bug An issue or pull request relating to a bug in Gatsby label Mar 8, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Mar 8, 2021
@LekoArts LekoArts added status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Mar 9, 2021
@LekoArts
Copy link
Contributor

LekoArts commented Mar 9, 2021

Hi!

Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. Also make sure that you installed everything correctly. Try deleting node_modules and package-lock.json and then do a npm install.

@jackywxd
Copy link

jackywxd commented Mar 9, 2021

I hit the same problem. For my case, it was caused by "gatsby-plugin-s3": "^0.3.8". After remove it, it works again.

@mrkaluzny
Copy link
Contributor Author

yarn add babel-preset-gatsby solved the issue for me ;)

@karlhorky
Copy link
Contributor

yarn add babel-preset-gatsby solved the issue for me ;)

Yeah, installing babel-preset-gatsby resolved the issue for us too when upgrading Gatsby versions recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

5 participants