伊呀程序
伊呀程序
  • 发布:2019-12-10 10:37
  • 更新:2019-12-11 10:53
  • 阅读:2017

升级到2.4.5后,无法运行到手机

分类:HBuilderX

问题已解决,是因为pages里面配置了condition,去掉condition配置即可,感谢 @DCloud_UNI_王亚琪 的提示

更新之前能正常运行的,更新之后编译就一直无法通过了,无论是标准基座,还是自定义基座,都无法运行,请问一下这是什么问题呢?

10:32:57.234 正在编译中...  
10:33:17.478 TypeError: Cannot read property 'length' of undefined  
10:33:17.485     at parseConfig (D:\Program Files\HBuilderX\plugins\weapp-tools\lib\index.js:1:5593)  
10:33:17.485     at index (D:\Program Files\HBuilderX\plugins\weapp-tools\lib\index.js:1:15980)  
10:33:17.492     at Promise (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\webpack-app-plus-plugin\index.js:103:13)  
10:33:17.493     at new Promise (<anonymous>)  
10:33:17.500     at compiler.hooks.done.tapPromise.compilation (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\webpack-app-plus-plugin\index.js:81:16)  
10:33:17.501     at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:17:17)  
10:33:17.509     at AsyncSeriesHook.lazyCompileHook (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\tapable\lib\Hook.js:154:20)  
10:33:17.511     at Watching._done (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Watching.js:97:28)  
10:33:17.520     at compiler.emitRecords.err (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Watching.js:72:19)  
10:33:17.521     at Compiler.emitRecords (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Compiler.js:375:39)  
10:33:17.529     at compiler.emitAssets.err (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Watching.js:53:20)  
10:33:17.529     at hooks.afterEmit.callAsync.err (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Compiler.js:361:14)  
10:33:17.538     at _err0 (eval at create (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:20:1)  
10:33:17.538     at callback (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\copy-webpack-plugin\dist\index.js:126:17)  
10:33:17.547     at afterEmit (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\copy-webpack-plugin\dist\index.js:220:13)  
10:33:17.547     at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:7:1)  
10:33:17.556 [ERROR] 读取app.json失败...  
10:33:17.567 ENOENT: no such file or directory, copyfile 'E:\wwwroot\ican_new_app\unpackage\dist\dev\.tmp\app-plus\manifest.json' -> 'E:\wwwroot\ican_new_app\unpackage\dist\dev\app-plus\manifest.json'  
10:33:17.568 Module build failed (from ./node_modules/@dcloudio/webpack-uni-pages-loader/lib/index.js):  
10:33:17.576 TypeError: Cannot read property 'pages' of undefined  
10:33:17.576     at module.exports (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\webpack-uni-pages-loader\lib\platforms\app-plus\index.js:370:69)  
10:33:17.586     at Object.module.exports (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\webpack-uni-pages-loader\lib\index-new.js:77:71)  
10:33:17.586     at Object.module.exports (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\webpack-uni-pages-loader\lib\index.js:45:35)  
10:33:17.595  ERROR  Build failed with errors.  
2019-12-10 10:37 负责人:无 分享
已邀请:

最佳回复

DCloud_UNI_GSQ

DCloud_UNI_GSQ

HBuilderX 2.4.5 配置condition后运行到app报错的问题,临时解决方案:任意增加一个 nvue 页面或者去掉 pages.json condition 节点

DCloud_uni-ad_HDX

DCloud_uni-ad_HDX

今天发布更新修复

DCloud_uniCloud_WYQ

DCloud_uniCloud_WYQ

是不是在页面里面配置了condition?

  • 伊呀程序 (作者)

    是的,有配置这个,新版不支持了吗

    2019-12-10 11:01

  • 伊呀程序 (作者)

    去掉以后果然能跑了,感谢回答,话说这个是取消掉了么

    2019-12-10 11:07

DCloud_uni-ad_HDX

DCloud_uni-ad_HDX

HBuilderX 2.4.6+ 已修复

  • 伊呀程序 (作者)

    已更新,这效率,赞!

    2019-12-11 15:15

2***@qq.com

2***@qq.com

一样的问题,自定义基座就运行不了

  • 伊呀程序 (作者)

    标准基座也一样不能运行 ....

    2019-12-10 11:00

  • 伊呀程序 (作者)

    我的是pages里面配置了condition, 去掉了就正常了。

    2019-12-10 11:08

  • 2***@qq.com

    回复 伊呀程序: 嗯,是这个问题

    2019-12-10 11:17

xiao码狮

xiao码狮 - ...

感谢

bctop

bctop

我昨天还犯迷糊呢 !今天就更新啦 点赞!

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