vue3 基座运行报错
[plugin:vite:uni-app-pages-json] Cannot read property 'autoclose' of undefined
[HBuilder] 16:33:48.048 at pages.json.js:1:0
[HBuilder] 16:33:48.051 error during build:
[HBuilder] 16:33:48.051 TypeError: Cannot read property 'autoclose' of undefined
[HBuilder] 16:33:48.056 at getSplashscreen (D:\Program Files\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\json\app\manifest\splashscreen.js:40:40)
[HBuilder] 16:33:48.057 at normalizeAppUniConfig (D:\Program Files\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\json\app\pages\uniConfig.js:15:86)
[HBuilder] 16:33:48.063 at normalizeAppConfigService (D:\Program Files\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\json\app\pages\index.js:16:63)
[HBuilder] 16:33:48.064 at Object.transform (D:\Program Files\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-app-vite\dist\plugins\pagesJson.js:34:76)
[HBuilder] 16:33:48.070 at D:\Program Files\HBuilderX\plugins\uniapp-cli-vite\node_modules\rollup\dist\shared\rollup.js:22681:25
3 个回复
c***@126.com
版本 3.4.14.20220607
新建项目-空uni-ui项目模板-vue3版本-创建-运行到安卓基座-报同样错误。
手工加入manifest.json--》源码视图--》"app-plus" --> "splashscreen":{} 后正常
-_-....请修复这个模板谢谢。
DCloud_UNI_Anne
查看相关问题:https://ask.dcloud.net.cn/question/137615
1***@qq.com (作者)
加了这个就好了 "app-plus" : {
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
2022-01-14 17:04
3***@qq.com
哪里加
DCloud_UNI_Anne
manifest.json--》源码视图--》app-plus节点
2022-03-10 20:16
3***@qq.com
回复 DCloud_UNI_Anne: 加了,重新打包还是这个问题
2022-03-10 20:31
DCloud_UNI_Anne
回复 3***@qq.com: 可以更新到最新版本,新建个vue3项目试下是否正常
2022-03-10 20:43
3***@qq.com
回复 DCloud_UNI_Anne: 我用的就是最新版本的,版本也是vue3项目
[HBuilder] 21:43:44.224 项目 '看图App模板' 开始编译...
[HBuilder] 21:43:51.823 编译器版本:3.3.11(vue3)
[HBuilder] 21:43:51.963 正在编译中...
[HBuilder] 21:44:00.639 vite v2.7.10 building for production...
[HBuilder] 21:44:00.655 [plugin:uni:app-pages-json] Cannot read property 'autoclose' of undefined
[HBuilder] 21:44:00.655 at pages.json.js:1:0
[HBuilder] 21:44:00.655 error during build:
[HBuilder] 21:44:00.655 TypeError: Cannot read property 'autoclose' of undefined
[HBuilder] 21:44:00.655 at getSplashscreen (D:\HBuilderX\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\json\app\manifest\splashscreen.js:40:40)
[HBuilder] 21:44:00.671 at normalizeAppUniConfig (D:\HBuilderX\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\json\app\pages\uniConfig.js:15:86)
[HBuilder] 21:44:00.671 at normalizeAppConfigService (D:\HBuilderX\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\json\app\pages\index.js:16:63)
[HBuilder] 21:44:00.686 at Object.transform (D:\HBuilderX\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-app-vite\dist\plugins\pagesJson.js:34:76)
[HBuilder] 21:44:00.686 at D:\HBuilderX\HBuilderX\plugins\uniapp-cli-vite\node_modules\rollup\dist\shared\rollup.js:22681:25
2022-03-10 21:44