npm在打包老项目时会有如下报错:

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

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

解决方法:

npm i babel-runtime --save

或者修改package.json文件添加如下代码:

"dependencies": {
  ...
    "babel-runtime": "^6.26.0",
  ...
  }

问题解决。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2022-12-23
  • 2021-09-16
相关资源
相似解决方案