d***@udown.cc
d***@udown.cc
  • 发布:2022-06-01 15:03
  • 更新:2022-06-02 15:27
  • 阅读:360

【报Bug】cli项目编译后h5界面打开空白,控制台报错

分类:uni-app

产品分类: uniapp/H5

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win10

浏览器平台: Chrome

浏览器版本: 101.0.4951.54

项目创建方式: CLI

CLI版本号: v2.0.1-34720220422002

示例代码:

"dependencies": {
"@dcloudio/uni-app-plus": "^2.0.1-34720220422002",
"@dcloudio/uni-h5": "^2.0.1-34720220422002",
"@dcloudio/uni-helper-json": "",
"@dcloudio/uni-i18n": "^2.0.1-34720220422002",
"@dcloudio/uni-mp-360": "^2.0.1-34720220422002",
"@dcloudio/uni-mp-alipay": "^2.0.1-34720220422002",
"@dcloudio/uni-mp-baidu": "^2.0.1-34720220422002",
"@dcloudio/uni-mp-jd": "^2.0.1-34720220422002",
"@dcloudio/uni-mp-kuaishou": "^2.0.1-34720220422002",
"@dcloudio/uni-mp-lark": "^2.0.1-34720220422002",
"@dcloudio/uni-mp-qq": "^2.0.1-34720220422002",
"@dcloudio/uni-mp-toutiao": "^2.0.1-34720220422002",
"@dcloudio/uni-mp-vue": "^2.0.1-34720220422002",
"@dcloudio/uni-mp-weixin": "^2.0.1-34720220422002",
"@dcloudio/uni-mp-xhs": "^2.0.1-34720220422002",
"@dcloudio/uni-quickapp-native": "^2.0.1-34720220422002",
"@dcloudio/uni-quickapp-webview": "^2.0.1-34720220422002",
"@dcloudio/uni-stat": "^2.0.1-34720220422002",
"@vue/shared": "^3.0.0",
"core-js": "^3.6.5",
"flyio": "^0.6.2",
"regenerator-runtime": "^0.12.1",
"vue": "^2.6.11",
"vuex": "^3.2.0"
},
"devDependencies": {
"@babel/runtime": "~7.12.0",
"@dcloudio/types": "^2.6.7",
"@dcloudio/uni-automator": "^2.0.1-34720220422002",
"@dcloudio/uni-cli-i18n": "^2.0.1-34720220422002",
"@dcloudio/uni-cli-shared": "^2.0.1-34720220422002",
"@dcloudio/uni-migration": "^2.0.1-34720220422002",
"@dcloudio/uni-template-compiler": "^2.0.1-34720220422002",
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.1-34720220422002",
"@dcloudio/vue-cli-plugin-uni": "^2.0.1-34720220422002",
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.1-34720220422002",
"@dcloudio/webpack-uni-mp-loader": "^2.0.1-34720220422002",
"@dcloudio/webpack-uni-pages-loader": "^2.0.1-34720220422002",
"@vue/cli-plugin-babel": "~4.5.17",
"@vue/cli-service": "~4.5.17",
"babel-plugin-import": "^1.11.0",
"cross-env": "^7.0.2",
"jest": "^25.4.0",
"mini-types": "
",
"miniprogram-api-typings": "*",
"postcss-comment": "^2.0.0",
"sass": "^1.49.8",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
},

操作步骤:

npm install -g @vue/cli@4
vue create -p dcloudio/uni-preset-vue my-project
选择 hello uni-app 项目
yarn serve

预期结果:

正常显示示例页面

实际结果:

空包,且控制台报错

bug描述:

https://github.com/dcloudio/uni-app/issues/3570

chunk-vendors.js:12075 Uncaught TypeError: Cannot set properties of undefined (setting 'default')
at _regeneratorRuntime (chunk-vendors.js:12075:19)
at eval (index.js:78:16)
at eval (index.js:78:16)
at Object.Q2AE (index.js:1661:1)
at webpack_require (index.js:854:30)
at fn (index.js:151:20)
at eval (main.js:2:1)
at Object.Vtdi (index.js:2076:1)
at
webpack_require
(index.js:854:30)
at fn (index.js:151:20)

2022-06-01 15:03 负责人:无 分享
已邀请:
DCloud_UNI_WZF

DCloud_UNI_WZF

可参考该 帖子 的解决方案

该问题目前已经被锁定, 无法添加新回复