Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Cannot find module 'babel-runtime/regenerator' #12

Closed
jacobherrington opened this issue Jul 8, 2018 · 12 comments
Closed

Cannot find module 'babel-runtime/regenerator' #12

jacobherrington opened this issue Jul 8, 2018 · 12 comments

Comments

@jacobherrington
Copy link

Following the gatsby/strapi tutorial and I am running into an error message: Cannot find module 'babel-runtime/regenerator'

The message only shows up after I update gatsby-config.js with the gatsby-source-strapi plugin info.

Using Node 10.6.0 and npm 6.1.0.

@lauriejim
Copy link
Contributor

I follow the tuto and I don't get any errors...

@jacobherrington
Copy link
Author

Interesting, I'll give it another shot sometime. Thanks!

@iangregsondev
Copy link

This is strange, as I also get the error, there is always some chatter over at gatsby saying its a known problem but I haven't seen any workaround or fix.

So I would be happy to know if somebody fixed it and how ?

A lot of the replies are saying to use node > 8 and not node 4. I am on Node 10

@jacobherrington
Copy link
Author

@appsolutegeek That's interesting, maybe it's an issue with Node 10.

@lauriejim what version of Node where you using?

@iangregsondev
Copy link

Hi,

There is some talk of the issue / similar issue here gatsbyjs/gatsby#1905

One of the suggestion was to upgrade to gatsby beta, this does not work.

Although all other plugins don't seem to have this problem.

I hope we can get to the bottom of this as its stopping me from implementing strapi.

Would be interesting to know what versions of node - others are using that don't have the problem, if it's truly related to the node version.

@iangregsondev
Copy link

Hi, I just went back to 8.11.2

➜ my-new-blog node --version
v8.11.2

and same issue.

 Error: Cannot find module 'babel-runtime/regenerator'

  - v8-compile-cache.js:159 require
    [my-new-blog]/[v8-compile-cache]/v8-compile-cache.js:159:20

  - gatsby-node.js:3 Object.<anonymous>
    [Personal]/[gatsby-source-strapi]/gatsby-node.js:3:20

  - v8-compile-cache.js:178 Module._compile
    [my-new-blog]/[v8-compile-cache]/v8-compile-cache.js:178:30

  - module.js:11 require
    internal/module.js:11:18

  - api-runner-node.js:87 runAPI
    [my-new-blog]/[gatsby]/dist/utils/api-runner-node.js:87:20

  - api-runner-node.js:187
    [my-new-blog]/[gatsby]/dist/utils/api-runner-node.js:187:33

  - map.js:27
    [my-new-blog]/[async]/internal/map.js:27:9

  - eachOfLimit.js:64 replenish
    [my-new-blog]/[async]/internal/eachOfLimit.js:64:17

  - eachOfLimit.js:49 iterateeCallback
    [my-new-blog]/[async]/internal/eachOfLimit.js:49:17

  - onlyOnce.js:12
    [my-new-blog]/[async]/internal/onlyOnce.js:12:16

  - map.js:29
    [my-new-blog]/[async]/internal/map.js:29:13

  - util.js:16 tryCatcher
    [my-new-blog]/[bluebird]/js/release/util.js:16:23

  - nodeify.js:23 Promise.successAdapter
    [my-new-blog]/[bluebird]/js/release/nodeify.js:23:30

  - promise.js:566 Promise._settlePromise
    [my-new-blog]/[bluebird]/js/release/promise.js:566:21

@lauriejim
Copy link
Contributor

lauriejim commented Aug 2, 2018

I used node 9 for my test.

@iangregsondev
Copy link

Ok I am trying now with node 9 - I will report back.

@iangregsondev
Copy link

Same problem for me,

➜  my-new-blog gatsby -version
1.9.277
➜  my-new-blog node --version
v9.11.2

and here is my gasby-config.js (removing the strapi plugin - allows me to do gatsby develop again).

module.exports = {
  siteMetadata: {
    title: `Gatsby Default Starter`,
  },
  plugins: [
    `gatsby-plugin-react-helmet`,
    {
      resolve: `gatsby-source-strapi`,
      options: {
        apiURL: `http://strapi.test-me.com`,
        contentTypes: [ // List of the Content Types you want to be able to request from Gatsby.
          `article`,
          `user`
        ]
      },
    },
  ],
}

@vepins
Copy link

vepins commented Aug 7, 2018

I'm having the same problem with the gatsby strapi tutorial.
gatsby -version 1.1.581
node --version v8.9.4

Gatsby was running just fine. Changed gatsby-config.js based on instructions and couldn't restart the server. My config file is exactly the same as @appsolutegeek's (except for apiURL: localhost).

@iangregsondev
Copy link

So, I installed the latest plugin as I noticed there were some PR merged in. And now it appears to work. Well, I certainly didn't get the error.

Does anyone know what was fixed ?

There was no update here, I just thought of updating to see if there was any improvement - and it seems I got lucky :-)

Would be nice to know what the problem was though.

@chadfawcett
Copy link

I ran into this issue and it turned out I accidentally installed this plugin in the parent directory. When following the tutorial mentioned above, you will have the following directory structure:

  • gatsby-strapi-tutorial
    • api
      • ...
    • blog
      • ...

I accidentally installed into the gatsby-strapi-tutorial directory. Once I installed it into the blog directory, everything worked as expected.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants