Search code examples
npmdependenciesbabeljsgatsby

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


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.


Solution

  • 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.