GatsbyJS - 无法解析 'babel-runtime/helpers/possibleConstructorReturn'
GatsbyJS - Can't resolve 'babel-runtime/helpers/possibleConstructorReturn'
我有一个网站在过去 4 个月里 运行 没有问题。该站点随机停止在 Netlify 上部署,我不断收到此错误:
Generating development JavaScript bundle failed
Can't resolve 'babel-runtime/helpers/possibleConstructorReturn' in
'D:\Websites\nemesis-cheer\node_modules\react-script-tag\lib'
我已经尝试重新安装 babel,尝试降级到不同版本的 babel/runtime,尝试清除缓存并重新部署,甚至尝试恢复到我知道部署成功的旧版本的 repo,但他们仍然失败.
这是我的部署日志:
https://pastebin.com/raw/dH45EtP5
回购是:
https://github.com/mont266/nemesis-cheerleading
如果有人能帮助我,我真的很感激。
我建议您尝试将 "babel-runtime": "6.26.0"
添加到您的 package.json
也许它会为您修复错误
尝试升级您的 babel/core
依赖项。
现在您已将其锁定为 7.13.8
(根据您的 package-lock.json
), and it seems that the missing helpers are fixed in the 7.5.5
, according to this stack trace。
我通过重新安装 yarn 并执行 'yarn add babel-runtime' 解决了这个问题。一定是在某个时候不小心删除了整个插件。
我有一个网站在过去 4 个月里 运行 没有问题。该站点随机停止在 Netlify 上部署,我不断收到此错误:
Generating development JavaScript bundle failed
Can't resolve 'babel-runtime/helpers/possibleConstructorReturn' in
'D:\Websites\nemesis-cheer\node_modules\react-script-tag\lib'
我已经尝试重新安装 babel,尝试降级到不同版本的 babel/runtime,尝试清除缓存并重新部署,甚至尝试恢复到我知道部署成功的旧版本的 repo,但他们仍然失败.
这是我的部署日志: https://pastebin.com/raw/dH45EtP5
回购是: https://github.com/mont266/nemesis-cheerleading
如果有人能帮助我,我真的很感激。
我建议您尝试将 "babel-runtime": "6.26.0"
添加到您的 package.json
也许它会为您修复错误
尝试升级您的 babel/core
依赖项。
现在您已将其锁定为 7.13.8
(根据您的 package-lock.json
), and it seems that the missing helpers are fixed in the 7.5.5
, according to this stack trace。
我通过重新安装 yarn 并执行 'yarn add babel-runtime' 解决了这个问题。一定是在某个时候不小心删除了整个插件。