alibaba / macaca

Automation solution for multi-platform. 多端自动化解决方案
https://macacajs.github.io
MIT License
3.16k stars 418 forks source link

Win10下运行示例时安装Eelectron.App报错,请问下如何解决 #975

Closed kurapi closed 4 years ago

kurapi commented 4 years ago

我从官网的地址里下载了macaca-electron-app-sample示例,参照执行步骤说明执行了

执行到第三条npm run dist后,命令行窗口返回了ERR_ELECTRON_BUILDER_CANNOT_EXECUTE报错。以下为命令行返回的: Error: E:\nj_workhome\macaca-electron-app-sample\node_modules\_app-builder-bin@3.4.3@app-builder-bin\win\x64\app-builder.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE at ChildProcess.<anonymous> (E:\nj_workhome\macaca-electron-app-sample\node_modules\_builder-util@21.2.0@builder-util\src\util.ts:239:14) at Object.onceWrapper (events.js:422:26) at ChildProcess.emit (events.js:315:20) at maybeClose (internal/child_process.js:1051:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! macaca-electron-app-sample@1.0.0 dist:electron-builder npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the macaca-electron-app-sample@1.0.0 dist script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

以下为debug-log里的内容: 0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli 'E:\\nodejs\\node.exe', 1 verbose cli 'E:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'dist' 1 verbose cli ] 2 info using npm@6.14.4 3 info using node@v14.2.0 4 verbose run-script [ 'predist', 'dist', 'postdist' ] 5 info lifecycle macaca-electron-app-sample@1.0.0~predist: macaca-electron-app-sample@1.0.0 6 info lifecycle macaca-electron-app-sample@1.0.0~dist: macaca-electron-app-sample@1.0.0 7 verbose lifecycle macaca-electron-app-sample@1.0.0~dist: unsafe-perm in lifecycle true 8 verbose lifecycle macaca-electron-app-sample@1.0.0~dist: PATH: E:\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\nj_workhome\macaca-electron-app-sample\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\ImageMagick-7.0.8-Q16;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\TortoiseSVN\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\strawberry\c\bin;C:\strawberry\perl\bin;D:\测试工具\orcleclient\instantclient_12_2;C:\Program Files\Git\cmd;C:\Program Files (x86)\LeanPro\CukeTest\;C:\Users\测试\AppData\Local\Programs\Python\Python37\Scripts;C:\Program Files (x86)\Tesseract-OCR;C:\Program Files (x86)\HP\LoadRunner\strawberry-perl\perl\bin;C:\Program Files\Tesseract-OCR;C:\Ruby25-x64\bin;E:\Android\gradle-5.5.1\bin;E:\nodejs\node_cache;E:\nodejs\node_global;E:\ProgramFiles\sdk\platform-tools;E:\ProgramFiles\sdk\tools;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;E:\nodejs\;E:\nodejs\node_global;C:\Users\测试\AppData\Roaming\npm 9 verbose lifecycle macaca-electron-app-sample@1.0.0~dist: CWD: E:\nj_workhome\macaca-electron-app-sample 10 silly lifecycle macaca-electron-app-sample@1.0.0~dist: Args: [ '/d /s /c', 'electron-builder' ] 11 silly lifecycle macaca-electron-app-sample@1.0.0~dist: Returned: code: 1 signal: null 12 info lifecycle macaca-electron-app-sample@1.0.0~dist: Failed to exec dist script 13 verbose stack Error: macaca-electron-app-sample@1.0.0 dist:electron-builder 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (E:\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:315:20) 13 verbose stack at ChildProcess.<anonymous> (E:\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:315:20) 13 verbose stack at maybeClose (internal/child_process.js:1051:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) 14 verbose pkgid macaca-electron-app-sample@1.0.0 15 verbose cwd E:\nj_workhome\macaca-electron-app-sample 16 verbose Windows_NT 10.0.16299 17 verbose argv "E:\\nodejs\\node.exe" "E:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dist" 18 verbose node v14.2.0 19 verbose npm v6.14.4 20 error code ELIFECYCLE 21 error errno 1 22 error macaca-electron-app-sample@1.0.0 dist:electron-builder 22 error Exit status 1 23 error Failed at the macaca-electron-app-sample@1.0.0 dist script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ] 烦请帮助解答,谢谢!

macaca-bot commented 4 years ago

This is the translated issue:


Installation Eelectron.App error when running the sample under Win10, I ask how to solve

I downloaded macaca-electron-app-sample sample from the address of the official website of the reference to the implementation of the steps

The following is a debug-log the contents: 0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli 'E: \\ nodejs \\ node.exe', 1 verbose cli 'E: \\ nodejs \\ node_modules \\ npm \\ bin \\ npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'dist' 1 verbose cli] 2 info using npm@6.14.4 3 info using node@v14.2.0 4 verbose run-script [ 'predist', 'dist', 'postdist'] 5 info lifecycle macaca-electron-app-sample@1.0.0~predist: macaca-electron-app-sample@1.0.0 6 info lifecycle macaca-electron-app-sample@1.0.0~dist: macaca-electron-app-sample@1.0.0 7 verbose lifecycle macaca-electron-app-sample@1.0.0~dist: unsafe-perm in lifecycle true 8 verbose lifecycle macaca-electron-app-sample@1.0.0~dist: PATH: E: \ nodejs \ node_modules \ npm \ node_modules \ npm-lifecycle \ node-gyp-bin; E: \ nj_workhome \ macaca-electron-app -sample \ node_modules \ .bin; C: \ Program Files (x86) \ Common Files \ Oracle \ Java \ javapath; C: \ Program Files \ ImageMagick-7.0.8-Q16; C: \ ProgramData \ Oracle \ Java \ javapath ; C: \ Program Files (x86) \ Intel \ iCLS Client \; C: \ Program Files \ Intel \ iCLS Client \; C: \ Windows \ system32; C: \ Windows; C: \ Windows \ system32 \ Wbem; C : \ Windows \ System32 \ WindowsPowerShell \ v1.0 \; C: \ Program Files (x86) \ Intel \ Intel (R) Management Engine Components \ DAL; C: \ Program Files \ Intel \ Intel (R) Management Engine Components \ DAL; C: \ Program Files (x86) \ Intel \ Intel (R) Management Engine Components \ IPT; C: \ Program Files \ Intel \ Intel (R) Management Engine Components \ IPT; C: \ Program Files (x86) \ NVIDIA Corporation \ PhysX \ Common; C: \ Program Files \ TortoiseSVN \ bin; C: \ WINDOWS \ system32; C: \ WINDOWS; C: \ WINDOWS \ system32 \ Wbem; C: \ WINDOWS \ system32 \ WindowsPowerShell \ v1.0 \; C: \ strawberry \ c \ bin; C: \ strawberry \ perl \ Bin; D: \ Test Tools \ orcleclient \ instantclient_12_2; C: \ Program Files \ Git \ cmd; C: \ Program Files (x86) \ LeanPro \ CukeTest \; C: \ Users \ test \ AppData \ Local \ Programs \ Python \ Python37 \ Scripts; C: \ Program Files (x86) \ Tesseract-OCR; C: \ Program Files (x86) \ HP \ LoadRunner \ strawberry-perl \ perl \ bin; C: \ Program Files \ Tesseract-OCR; C: \ Ruby25-x64 \ bin; E: \ Android \ gradle-5.5.1 \ bin; E: \ nodejs \ node_cache; E: \ nodejs \ node_global; E: \ ProgramFiles \ sdk \ platform-tools; E: \ ProgramFiles \ sdk \ tools; C: \ Program Files \ Docker \ Docker \ resources \ bin; C: \ ProgramData \ DockerDesktop \ version-bin; E: \ nodejs \; E: \ nodejs \ node_global; C: \ Users \ test \ AppData \ Roaming \ npm 9 verbose lifecycle macaca-electron-app-sample@1.0.0~dist: CWD: E: \ nj_workhome \ macaca-electron-app-sample 10 silly lifecycle macaca-electron-app-sample@1.0.0~dist: Args: [ '/ d / s / c', 'electron-builder'] 11 silly lifecycle macaca-electron-app-sample@1.0.0~dist: Returned: code: 1 signal: null 12 info lifecycle macaca-electron-app-sample@1.0.0~dist: Failed to exec dist script 13 verbose stack Error: macaca-electron-app-sample@1.0.0 dist:electron-builder 13 verbose stack Exit status 1 13 verbose stack at EventEmitter <anonymous>. (E: \ nodejs \ node_modules \ npm \ node_modules \ npm-lifecycle \ index.js: 332: 16) 13 verbose stack at EventEmitter.emit (events.js: 315: 20) 13 verbose stack at ChildProcess <anonymous> (E: \ nodejs \ node_modules \ npm \ node_modules \ npm-lifecycle \ lib \ spawn.js: 55: 14). 13 verbose stack at ChildProcess.emit (events.js: 315: 20) 13 verbose stack at maybeClose (internal / child_process.js: 1051: 16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal / child_process.js: 287: 5) 14 verbose pkgid macaca-electron-app-sample@1.0.0 15 verbose cwd E: \ nj_workhome \ macaca-electron-app-sample 16 verbose Windows_NT 10.0.16299 17 verbose argv "E: \\ nodejs \\ node.exe" "E: \\ nodejs \\ node_modules \\ npm \\ bin \\ npm-cli.js" "run" "dist" 18 verbose node v14.2.0 19 verbose npm v6.14.4 20 error code ELIFECYCLE 21 error errno 1 22 error macaca-electron-app-sample@1.0.0 dist:electron-builder 22 error Exit status 1 23 error Failed at the macaca-electron-app-sample@1.0.0 dist script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [1, true] Please help answer, thank you!

xudafeng commented 4 years ago

@kurapi 尝试cnpm安装可以避免网络问题

macaca-bot commented 4 years ago

This is the translated issue comment: @xudafeng


@kurapi try cnpm install avoid network problems