GatsbyJS - Can't resolve 'babel-runtime/helpers/possibleConstructorReturn'

Viewed 805

I have a website that has been running fine for the last 4 months. Randomly the site stopped deploying on Netlify and I keep getting this error:

    Generating development JavaScript bundle failed

Can't resolve 'babel-runtime/helpers/possibleConstructorReturn' in
'D:\Websites\nemesis-cheer\node_modules\react-script-tag\lib'

I have tried reinstalling babel, tried downgrading to different versions of babel/runtime, tried clearing cache and redeploying, Even tried reverting to old versions of the repo that I know for a fact deploy successfully and they still failed.

Here is my deploy log: https://pastebin.com/raw/dH45EtP5

The repo is: https://github.com/mont266/nemesis-cheerleading

Im really stomped here if anyone could help me out I would really appreciate it.

3 Answers

Try upgrading your babel/core dependency.

Now you have it locked to 7.13.8 (according to your package-lock.json), and it seems that the missing helpers are fixed in the 7.5.5, according to this stack trace.

I fixed the issue by reinstalling yarn and doing 'yarn add babel-runtime'. Must've gotten rid of the entire plugin at somepoint by accident.

I suggest you to try adding "babel-runtime": "6.26.0" to your package.json Maybe it would fix an error for you

Related