gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.21k stars 10.33k forks source link

gatsby new: Cannot find module 'regenerator-runtime/runtime' #1791

Closed sroettering closed 7 years ago

sroettering commented 7 years ago

Hi,

I wanted to play around with gatsby today. But I am not able to setup a new project with the gatsby new command. I followed the instructions in the Getting Started section of the documentation. I installed gatsby globally with the @latest flag. However, running gatsby --version or any other gatsby command already throws this error message:

module.js:327
    throw err;
    ^

Error: Cannot find module 'regenerator-runtime/runtime'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/gatsby-cli/index.js:92:1)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)

I'm running OSX with node v4.6.0 (quite old I think)

KyleAMathews commented 7 years ago

Try npm install -g gastby-cli@latest

sroettering commented 7 years ago

Tried that, but didn't work. Had to update node to 6.11.2 to get it working. I would close this issue now, since my problem is solved.

KyleAMathews commented 7 years ago

Hmmm odd. @jquense any idea why this error would pop up in Node v4? I'm ok just killing Node 4 support vs. burning debugging time on it.