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

Error: Cannot find module 'gatsby/utils' #13567

Closed
jonleopard opened this issue Apr 23, 2019 · 6 comments
Closed

Error: Cannot find module 'gatsby/utils' #13567

jonleopard opened this issue Apr 23, 2019 · 6 comments

Comments

@jonleopard
Copy link

Description

An error occurs when running gatsby in development mode.

Steps to reproduce

Use gatsby-source-filesystem in your site.

Expected result

Gatsby should run in development mode with no errors.

Actual result

Getting strange error after upgrading the gatsby-source-filesystem package:

error Error in "/Users/jon/projects/jonleopard.com/node_modules/gatsby-source-filesystem/gatsby-node.js":

Error: Cannot find module 'gatsby/utils'

This happens when I run gatsby in development mode.

Any clue on whats going on here?

Environment

System:
OS: macOS 10.14.4
CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
Shell: 5.7.1 - /usr/local/bin/zsh
Binaries:
Node: 11.14.0 - ~/n/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Languages:
Python: 2.7.16 - /usr/local/bin/python
Browsers:
Chrome: 73.0.3683.103
Firefox: 66.0.3
Safari: 12.1
npmPackages:
gatsby: ^2.3.25 => 2.3.26
gatsby-cli: ^2.5.9 => 2.5.9
gatsby-codemods: ^1.0.10 => 1.0.10
gatsby-mdx: ^0.6.2 => 0.6.2
gatsby-plugin-google-analytics: ^2.0.18 => 2.0.18
gatsby-plugin-manifest: ^2.0.29 => 2.0.29
gatsby-plugin-netlify: ^2.0.14 => 2.0.15
gatsby-plugin-react-helmet: ^3.0.12 => 3.0.12
gatsby-plugin-sharp: ^2.0.35 => 2.0.35
gatsby-plugin-sitemap: ^2.0.12 => 2.0.12
gatsby-plugin-styled-components: ^3.0.7 => 3.0.7
gatsby-remark-prismjs: ^3.2.8 => 3.2.8
gatsby-source-contentful: ^2.0.50 => 2.0.51
gatsby-source-filesystem: ^2.0.29 => 2.0.30
gatsby-transformer-json: ^2.1.11 => 2.1.11
gatsby-transformer-remark: ^2.3.8 => 2.3.9
gatsby-transformer-sharp: ^2.1.18 => 2.1.18

@Arcath
Copy link

Arcath commented Apr 23, 2019

I was literally writing up the same issue.

My gatsby info:

  System:
    OS: Windows 10
    CPU: x64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz
  Binaries:
    Yarn: 1.6.0 - C:\Users\adam\AppData\Roaming\npm\yarn.CMD
    npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 42.17134.1.0
  npmPackages:
    gatsby: ^2.3.26 => 2.3.26
    gatsby-image: ^2.0.39 => 2.0.39
    gatsby-plugin-canonical-urls: ^2.0.12 => 2.0.12
    gatsby-plugin-emotion: ^4.0.6 => 4.0.6
    gatsby-plugin-feed: ^2.1.1 => 2.1.1
    gatsby-plugin-google-gtag: ^1.0.16 => 1.0.16
    gatsby-plugin-lunr: ^1.4.0 => 1.4.0
    gatsby-plugin-manifest: ^2.0.29 => 2.0.29
    gatsby-plugin-react-helmet: ^3.0.12 => 3.0.12
    gatsby-plugin-sharp: ^2.0.35 => 2.0.35
    gatsby-plugin-sitemap: ^2.0.12 => 2.0.12
    gatsby-plugin-typescript: ^2.0.13 => 2.0.13
    gatsby-remark-copy-linked-files: ^2.0.11 => 2.0.11
    gatsby-remark-custom-blocks: ^2.0.7 => 2.0.7
    gatsby-remark-images: ^3.0.11 => 3.0.11
    gatsby-remark-prismjs: ^3.2.8 => 3.2.8
    gatsby-remark-responsive-iframe: ^2.1.1 => 2.1.1
    gatsby-remark-smartypants: ^2.0.9 => 2.0.9
    gatsby-source-filesystem: ^2.0.30 => 2.0.30
    gatsby-transformer-json: ^2.1.11 => 2.1.11
    gatsby-transformer-remark: ^2.3.9 => 2.3.9
    gatsby-transformer-sharp: ^2.1.18 => 2.1.18

If it helps my sites source is here: https://github.com/Arcath/arcath.net-gatsby

My site builds fine from source until you update to gatsby 2.3.26 and gatsby-source-filesystem 2.0.30

@KyleAMathews
Copy link
Contributor

#8992 broke this. I'll fix it real quick.

@KyleAMathews
Copy link
Contributor

@pieh just published #13568 so things should be working again! Sorry for the bother.

@KyleAMathews
Copy link
Contributor

Just upgrade to the latest version of the packages.

@jonleopard
Copy link
Author

Appreciate the quick fix @KyleAMathews

@Arcath
Copy link

Arcath commented Apr 23, 2019

@KyleAMathews Thanks! Can confirm my site is building again after an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants