求助: nuxt 打包报错 core-js

在使用Nuxt进行项目打包时遇到错误,提示找不到core-js的相关模块。错误涉及es6.array.iterator, es6.date.to-string等多个模块。这可能是由于依赖升级或配置问题导致的。解决方法包括检查项目的依赖版本,确保与Nuxt版本兼容,或者尝试使用`npm install --save core-js`安装缺少的模块。" 126974567,11661248,施工企业安全生产双重预防机制数字化解决方案,"['安全管理', '建筑施工', '风险评估', '数字化转型', '隐患排查']
摘要由CSDN通过智能技术生成

本地运行 npm run generate 可以正常打包上传到服务器就会报如下错误

ERROR in ./.nuxt/client.js Module not found: Error: Can't resolve 'core-js/modules/es6.array.iterator' in '/var/jenkins_home/workspace/flks-wechat/.nuxt' @ ./.nuxt/client.js 14:0-44 @ multi ./.nuxt/client.js

ERROR in ./.nuxt/utils.js Module not found: Error: Can't resolve 'core-js/modules/es6.date.to-string' in '/var/jenkins_home/workspace/flks-wechat/.nuxt' @ ./.nuxt/utils.js 7:0-44 @ ./.nuxt/client.js @ multi ./.nuxt/client.js

ERROR in ./pages/index.vue?vue&type=script&lang=js& (./node_modules/_babel-loader@8.0.5@babel-loader/lib??ref--2-0!./node_modules/_vue-loader@15.7.0@vue-loader/lib??vue-loader-options!./pages/index.vue?vue&type=script&lang=js&) Module not found: Error: Can't resolve 'core-js/modules/es6.date.to-string' in '/var/jenkins_home/workspace/flks-wechat/pages' @ ./pages/index.vue?vue&type=script&lang=js& (./node_modules/_babel-loader@8.0.5@babel-loader/lib??ref--2-0!./node_modules/_vue-loader@15.7.0@vue-loader/lib??vue-loader-options!./pages/index.vue?vue&type=script&lang=js&) 2:0-44 @ ./pages/index.vue?vue&type=script&lang=js& @ ./pages/index.vue @ ./.nuxt/router.js @ ./.nuxt/index.js @ ./.nuxt/client.js @ multi ./.nuxt/client.js

ERROR in ./plugins/axios.js Module not found: Error: Can't resolve 'core-js/modules/es6.date.to-string' in '/var/jenkins_home/workspace/flks-wechat/plugins' @ ./plugins/axios.js 2:0-44 @ ./.nuxt/index.js @ ./.nuxt/client.js @ multi ./.nuxt/client.js

ERROR in ./.nuxt/client.js Module not found: Error: Can't resolve 'core-js/modules/es6.function.name' in '/var/jenkins_home/workspace/flks-wechat/.nuxt' @ ./.nuxt/client.js 13:0-43 @ multi ./.nuxt/client.js

ERROR in ./.nuxt/index.js Module not found: Error: Can't resolve 'core-js/modules/es6.function.name' in '/var/jenkins_home/workspace/flks-wechat/.nuxt' @ ./.nuxt/index.js 5:0-43 @ ./.nuxt/client.js @ multi ./.nuxt/client.js

ERROR in ./.nuxt/utils.js Module not found: Error: Can't resolve 'core-js/modules/es6.function.name' in '/var/jenkins_home/workspace/flks-wechat/.nuxt' @ ./.nuxt/utils.js 17:0-43 @ ./.nuxt/client.js @ multi ./.nuxt/client.js

ERROR in ./.nuxt/axios.js Module not found: Error: Can't resolve 'core-js/modules/es6.function.name' in '/var/jenkins_home/workspace/flks-wechat/.nuxt' @ ./.nuxt/axios.js 2:0-43 @ ./.nuxt/index.js @ ./.nuxt/client.js @ multi ./.nuxt/client.js

ERROR in ./assets/request/login/login.js Module not found: Error: Can't resolve 'core-js/modules/es6.function.name' in '/var/jenkins_home/workspace/flks-wechat/assets/request/login' @ ./assets/request/login/login.js 1:0-43 @ ./node_modules/_babel-loader@8.0.5@babel-loader/lib??ref--2-0!./node_modules/_vue-loader@15.7.0@vue-loader/lib??vue-loader-options!./pages/announcements/announcements.vue?vue&type=script&lang=js& @ ./pages/announcements/announcements.vue?vue&type=script&lang=js& @ ./pages/announcements/announcements.vue @ ./.nuxt/router.js @ ./.nuxt/index.js @ ./.nuxt/client.js @ multi ./.nuxt

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值