Gatsby: [v2] Error: Cannot find module 'gatsby-starter-modern\.babelrc.js'

Created on 15 May 2018  ยท  4Comments  ยท  Source: gatsbyjs/gatsby

Description

Since I have updated gatsby@2, the following error gets shown when running yarn develop on gatsby-starter-modern.

Steps to reproduce

  1. Clone gatsby-starter-modern
  2. Run yarn add gatsby@next gatsby-plugin-sass@next
  3. Execute yarn develop

Expected result

No errors should be thrown.

Actual result

$ gatsby develop
success delete html and css files from previous builds โ€” 0.009 s
success open and validate gatsby-config.js โ€” 0.009 s
success copy gatsby files โ€” 0.131 s
success onPreBootstrap โ€” 0.048 s
success source and transform nodes โ€” 0.029 s
success building schema โ€” 0.210 s
success createLayouts โ€” 0.011 s
success createPages โ€” 0.003 s
success createPagesStatefully โ€” 0.058 s
success onPreExtractQueries โ€” 0.001 s
success update schema โ€” 0.076 s
success extract queries from components โ€” 0.089 s
success run graphql queries โ€” 0.038 s
success write out page data โ€” 0.010 s
success write out redirect data โ€” 0.005 s
success onPostBootstrap โ€” 0.001 s

info bootstrap finished - 10.947 s

error UNHANDLED EXCEPTION


  Error: Cannot find module 'C:\Development\Projects\gatsby-starter-modern\.babelrc.js'

  - v8-compile-cache.js:159 require
    [gatsby-starter-modern]/[v8-compile-cache]/v8-compile-cache.js:159:20

  - gatsby-node.js:48 findBabelrcJs
    [gatsby-starter-modern]/[gatsby]/dist/internal-plugins/load-babel-config/gatsby-node.js:    48:29

  - gatsby-node.js:152 Object.exports.onCreateBabelConfig
    [gatsby-starter-modern]/[gatsby]/dist/internal-plugins/load-babel-config/gatsby-node.js:    152:43

  - api-runner-node.js:98 runAPI
    [gatsby-starter-modern]/[gatsby]/dist/utils/api-runner-node.js:98:37

  - api-runner-node.js:167 mapSeries
    [gatsby-starter-modern]/[gatsby]/dist/utils/api-runner-node.js:167:25

  - map.js:27
    [gatsby-starter-modern]/[async]/internal/map.js:27:9

  - eachOfLimit.js:64 replenish
    [gatsby-starter-modern]/[async]/internal/eachOfLimit.js:64:17

  - eachOfLimit.js:49 iterateeCallback
    [gatsby-starter-modern]/[async]/internal/eachOfLimit.js:49:17

  - onlyOnce.js:12
    [gatsby-starter-modern]/[async]/internal/onlyOnce.js:12:16

  - map.js:29
    [gatsby-starter-modern]/[async]/internal/map.js:29:13

  - util.js:16 tryCatcher
    [gatsby-starter-modern]/[bluebird]/js/release/util.js:16:23

  - nodeify.js:23 Promise.successAdapter
    [gatsby-starter-modern]/[bluebird]/js/release/nodeify.js:23:30

  - promise.js:566 Promise._settlePromise
    [gatsby-starter-modern]/[bluebird]/js/release/promise.js:566:21


error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Environment

  • Gatsby version (npm list gatsby): 2.0.0-alpha.36
  • gatsby-cli version (gatsby --version): 2.0.0-alpha.36
  • Node.js version: 8.11.1
  • Operating System: Windows 10 x64

File contents (if changed)

See https://github.com/kripod/gatsby-starter-modern/tree/d2ce864348782014214842da3e3b484a14b5a83c.

question or discussion

Most helpful comment

I published a new gatsby release which should have fixed the broken one from last night. Please try again @kripod! Thanks for jumping in to help get v2 ready for release!

All 4 comments

I tried to reproduce it, but there seems to be broken gatsby alpha release currently (at least for me) and when I tried to workaround it and used gatsby-dev to get latest gatsby, I didn't get this error. Did you have problems when installing gatsby@next?

@pieh I haven't tried gatsby-dev, but as stated in the issue, installing gatsby@next using Yarn produces the error above during gatsby develop. It may be a Yarn-related issue, as it treats some canary versions as the latest instead of acquiring releases from the next channel.

I published a new gatsby release which should have fixed the broken one from last night. Please try again @kripod! Thanks for jumping in to help get v2 ready for release!

Everything works fine now, thank you for the quick response and fix!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dustinhorton picture dustinhorton  ยท  3Comments

benstr picture benstr  ยท  3Comments

ferMartz picture ferMartz  ยท  3Comments

jimfilippou picture jimfilippou  ยท  3Comments

ghost picture ghost  ยท  3Comments