you can run: npm install save corejs/modules/es.regexp.exec corejs/modules/es.string.replace(已解决

添加this.$router.replace(path)后,在运行vue过程中出现如下报错:
core-js 缺失问题,首先安装core-js :
npm install core-js@2
// or
yarn add core-js@2


发现依旧报错,考虑可能是版本问题,安装core-js的最新版本试试:
npm install core-js@3.6.4
// or
yarn add core-js@3.6.4

成功解决。
https://blog.csdn.net/weixin_42118522/article/details/107436572
原文地址:https://www.cnblogs.com/roak/p/14639450.html