夏武依依
夏武依依
  • 发布:2022-02-21 18:24
  • 更新:2022-09-14 17:25
  • 阅读:1228

HBuilderX uni-app自动化测试 按照文档已经配置好,但是运行报错

分类:uni-app

1.新建项目-选择 Hell uni-app 模板,

  1. 参考文档:进行逐步配置 https://uniapp.dcloud.net.cn/collocation/auto/hbuilderx-extension/index
  2. 运行自动化测试用例
  3. 运行失败
    LibSass 的二进制文件(/Applications/HBuilderX.app/Contents/HBuilderX/plugins/compile-node-sass/node_modules/node-sass-china/vendor/darwin-x64-83/binding.node)缺失,请执行下面3条命令下载对应版本的二进制文件:(有可能引发此错误的原因是 Node 版本变更)[0m
    按照上面执行, 那3个命令,结果又出现了其他问题
    Error: dlopen(/Applications/HBuilderX.app/Contents/HBuilderX/plugins/compile-node-sass/node_modules/node-sass-china/vendor/darwin-x64-83/binding.node, 1): no suitable image found. Did find:
    18:22:19.869 [hello-test:h5] /Applications/HBuilderX.app/Contents/HBuilderX/plugins/compile-node-sass/node_modules/node-sass-china/vendor/darwin-x64-83/binding.node: file too short
    18:22:19.902 [hello-test:h5] /Applications/HBuilderX.app/Contents/HBuilderX/plugins/compile-node-sass/node_modules/node-sass-china/vendor/darwin-x64-83/binding.node: file too short
    18:22:19.928 [hello-test:h5] at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
    18:22:19.950 [hello-test:h5] at Module.load (internal/modules/cjs/loader.js:928:32)
    18:22:19.971 [hello-test:h5] at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    18:22:19.994 [hello-test:h5] at Module.require (internal/modules/cjs/loader.js:952:19)
    18:22:20.015 [hello-test:h5] at require (internal/modules/cjs/helpers.js:88:18)
    18:22:20.039 [hello-test:h5] at /Applications/HBuilderX.app/Contents/HBuilderX/plugins/compile-node-sass/node_modules/node-sass-china/lib/binding.js:19:10
    18:22:20.065 [hello-test:h5] at Object.<anonymous> (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/compile-node-sass/node_modules/node-sass-china/lib/index.js:14:35)
    18:22:20.104 [hello-test:h5] at Module._compile (internal/modules/cjs/loader.js:1063:30)
    18:22:20.149 [hello-test:h5] at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    18:22:20.149 [hello-test:h5] at Module.load (internal/modules/cjs/loader.js:928:32)
    18:22:20.186 [hello-test:h5] at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    18:22:20.210 [hello-test:h5] at Module.require (internal/modules/cjs/loader.js:952:19)
    18:22:20.232 [hello-test:h5] at require (internal/modules/cjs/helpers.js:88:18)
    18:22:20.260 [hello-test:h5] at Object.<anonymous> (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/compile-node-sass/node_modules/node-sass-china/index.js:8:22)
    18:22:20.265 [hello-test:h5] at Module._compile (internal/modules/cjs/loader.js:1063:30)
    18:22:20.302 [hello-test:h5] at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    18:23:01.801 [hello-test:h5] Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js):
    18:23:01.821 [hello-test:h5] Error: dlopen(/Applications/HBuilderX.app/Contents/HBuilderX/plugins/compile-node-sass/node_modules/node-sass-china/vendor/darwin-x64-83/binding.node, 1): no suitable image found. Did find:
    18:23:01.842 [hello-test:h5] /Applications/HBuilderX.app/Contents/HBuilderX/plugins/compile-node-sass/node_modules/node-sass-china/vendor/darwin-x64-83/binding.node: file too short
    18:23:01.867 [hello-test:h5] /Applications/HBuilderX.app/Contents/HBuilderX/plugins/compile-node-sass/node_modules/node-sass-china/vendor/darwin-x64-83/binding.node: file too short
    18:23:01.896 [hello-test:h5] at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
    18:23:01.916 [hello-test:h5] at Module.load (internal/modules/cjs/loader.js:928:32)
    18:23:01.943 [hello-test:h5] at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    18:23:01.947 [hello-test:h5] at Module.require (internal/modules/cjs/loader.js:952:19)
    18:23:01.968 [hello-test:h5] at require (internal/modules/cjs/helpers.js:88:18)
    18:23:02.022 [hello-test:h5] at /Applications/HBuilderX.app/Contents/HBuilderX/plugins/compile-node-sass/node_modules/node-sass-china/lib/binding.js:19:10
    18:23:02.024 [hello-test:h5] at Object.<anonymous> (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/compile-node-sass/node_modules/node-sass-china/lib/index.js:14:35)
    18:23:02.056 [hello-test:h5] at Module._compile (internal/modules/cjs/loader.js:1063:30)
    18:23:02.084 [hello-test:h5] at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    18:23:02.089 [hello-test:h5] at Module.load (internal/modules/cjs/loader.js:928:32)
    18:23:02.122 [hello-test:h5] at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    18:23:02.122 [hello-test:h5] at Module.require (internal/modules/cjs/loader.js:952:19)
    18:23:02.142 [hello-test:h5] at require (internal/modules/cjs/helpers.js:88:18)
    18:23:02.145 [hello-test:h5] at Object.<anonymous> (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/compile-node-sass/node_modules/node-sass-china/index.js:8:22)
    18:23:02.165 [hello-test:h5] at Module._compile (internal/modules/cjs/loader.js:1063:30)
    18:23:02.188 [hello-test:h5] at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
2022-02-21 18:24 负责人:无 分享
已邀请:
DCloud_HB_WDL

DCloud_HB_WDL

这个跟自动化测试没关系吧。 项目本身编译就失败了。

解决方法:进入/Applications/HBuilderX.app/Contents/HBuilderX/plugins/compile-node-sass目录,执行npm install,重新安装一下compile-node-sass的依赖库。

  • 夏武依依 (作者)

    项目本身是没有问题的,就是按照自动化测试配置,一运行就报这样的错,一直没有获取测试报告

    2022-02-21 18:39

5***@qq.com

5***@qq.com - APP开发

我也是这个问题,怎么解决

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