Search code examples
javascriptreactjsdockerbabeljs

Uncaught ReferenceError: regeneratorRuntime is not defined in reactjs when i use docker


my problem is that i am getting this error when i run my react-app with docker image. When i am not running my react app with docker image works fine. I have seen a lot of stuff on stack Overflow but none of this solved my problem.

I am using babel version < 7 specific is 6.26.0

I have tried to upgrade my babel version to 7 with this instructions, also i have tried this but it's not solve my problem.

Can anyone help me with this?


Solution

  • With the help of Burak Ayyildiz, i solve my problem. I just install babel-plugin-transform-runtime with this command: npm i babel-plugin-transform-runtime (I am using babel<7). Also on the babelrc file i add this on plugins: "transform-runtime"