不是发哥
不是发哥
  • 发布:2021-04-15 18:38
  • 更新:2021-04-16 10:09
  • 阅读:1035

【报Bug】《hello uni-app》无法正常启动华为快应用

分类:uni-app

产品分类: uniapp/快应用/华为

渲染模式: webview

示例代码:

请直接使用官方默认模板、或者hello uni-app项目,运行便知

操作步骤:

请直接使用官方默认模板、或者hello uni-app项目,运行便知

预期结果:

不会报错,正常运行

实际结果:

报错,不能允许

bug描述:

已经尝试了华为、小米、oppo、魅族等手机,都是这样的报错,所以排除手机问题
也尝试了,官方默认模板、hello uni-app模板,报错也是一样的,排除是我代码问题
也尝试了cli、Hx,报错一致,排除工具问题
所以,总结,是bug

启动便报错,具体错误如下:

Error: Cannot find module 'd:\hello\dist\dev\quickapp-webview-huawei\components\c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\common\css-runtime-api.js'  
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)  
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)  
    at Module.require (internal/modules/cjs/loader.js:692:17)  
    at require (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)  
    at c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\extract-loader.js:1:3675  
    at e (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\extract-loader.js:1:3278)  
    at evalmachine.<anonymous>:1:21  
    at Script.runInContext (vm.js:133:20)  
    at Script.runInNewContext (vm.js:139:17)  
    at c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\extract-loader.js:1:3723  
    at tryCatch (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:45:40)  
    at Generator.invoke [as _invoke] (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:274:22)  
    at Generator.prototype.(anonymous function) [as next] (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:97:21)  
    at asyncGeneratorStep (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\extract-loader.js:1:1443)  
    at i (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\extract-loader.js:1:1681)  
    at c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\extract-loader.js:1:1773  
    at new Promise (<anonymous>)  
    at c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\extract-loader.js:1:1610  
    at n (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\extract-loader.js:1:4824)  
    at h (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\extract-loader.js:1:2850)  
    at evalDependencyGraph (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\extract-loader.js:1:4848)  
    at Object.<anonymous> (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\extract-loader.js:1:2435)  
    at tryCatch (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:45:40)  
    at Generator.invoke [as _invoke] (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:274:22)  
    at Generator.prototype.(anonymous function) [as next] (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:97:21)  
    at asyncGeneratorStep (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\extract-loader.js:1:1443)  
    at i (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\extract-loader.js:1:1681)  
    at c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\extract-loader.js:1:1773  
    at new Promise (<anonymous>)  
    at Object.<anonymous> (c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\extract-loader.js:1:1610)  

Module build failed (from c:/APP/Huawei QuickApp IDE/resources/app/extensions/deveco-debug/node_modules/fa-toolkit/lib/web-compiler/extract-loader.js):  
internal/modules/cjs/loader.js:638  
    throw err;  
    ^
2021-04-15 18:38 负责人:无 分享
已邀请:
DCloud_uniAD_HDX

DCloud_uniAD_HDX

在windows平台,如果华为IDE和项目不在一个盘符下面会导致路径错误
当前版本解决方案,把项目和华为IDE放到一个盘下面

华为IDE Windows平台 3.0.2 的bug,已向华为反馈这个问题

  • 不是发哥 (作者)

    确实如此,已临时解决,可运行了,但看起来兼容性问题不少

    2021-04-16 11:54

不是发哥

不是发哥 (作者)

初步判断是,模块化解析错误,怎么可能有这样的地址呢?

d:\hello\dist\dev\quickapp-webview-huawei\components\c:\APP\Huawei QuickApp IDE\resources\app\extensions\deveco-debug\node_modules\fa-toolkit\lib\web-compiler\common\css-runtime-api.js

模块肯定出错啊

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