详细问题描述
小程序编译正常,H5编译报错
17:08:07.775 pages.json 解析失败
17:08:07.783 /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-cli-shared/lib/pages.js:73
17:08:07.784 if (pagesJson.pages && pagesJson.pages.length) { // 如果首页是 nvue
17:08:07.788 ^
17:08:07.789 TypeError: Cannot read property 'pages' of undefined
17:08:07.795 at processPagesJson (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-cli-shared/lib/pages.js:73:17)
17:08:07.800 at getPagesJson (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-cli-shared/lib/pages.js:37:10)
17:08:07.801 at Object.<anonymous> (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/lib/env.js:104:22)
17:08:07.807 at Module._compile (module.js:652:30)
17:08:07.807 at Object.Module._extensions..js (module.js:663:10)
17:08:07.815 at Module.load (module.js:565:32)
17:08:07.816 at tryModuleLoad (module.js:505:12)
17:08:07.823 at Function.Module._load (module.js:497:3)
17:08:07.823 at Module.require (module.js:596:17)
17:08:07.832 at require (internal/module.js:11:18)
[内容]
重现步骤
[步骤]
[结果]
[期望]
[如果语言难以表述清晰,拍一个视频或截图,有图有真相]
IDE运行环境说明
[HBuilder 或 HBuilderX。如果你用其他工具开发uni-app,也需要在此说明]
[IDE版本号]
[windows版本号]
[mac版本号]
uni-app运行环境说明
[运行端是h5或app或某个小程序?]
[运行端版本号]
[项目是cli创建的还是HBuilderX创建的?如果是cli创建的,请更新到最新版cli再试]
[编译模式是老模板模式还是新的自定义组件模式?]
App运行环境说明
[Android版本号]
[iOS版本号]
[手机型号]
[模拟器型号]
附件
[IDE问题请提供HBuilderX运行日志。菜单帮助-查看运行日志,点右键打开文件所在目录,将log文件压缩成zip包上传]
[App问题请提供可重现问题的代码片段,你补充的细一点,问题就解决的快一点]
[App安装包或H5地址]
[可重现代码片段]
联系方式
[QQ]