javascript - 构建失败的 Cordova
问题描述
我正在尝试使用 Cordova-build-android 构建一个 Framework7 应用程序,但我遇到了错误。
所有变量都设置正确,我使用 NVM 来管理我的节点版本。
这是错误日志:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build-cordova-android' ]
2 info using npm@5.6.0
3 info using node@v8.9.4
4 verbose run-script [ 'prebuild-cordova-android',
4 verbose run-script 'build-cordova-android',
4 verbose run-script 'postbuild-cordova-android' ]
5 info lifecycle myapp@1.0.0~prebuild-cordova-android: myapp@1.0.0
6 info lifecycle myapp@1.0.0~build-cordova-android: myapp@1.0.0
7 verbose lifecycle myapp@1.0.0~build-cordova-android: unsafe-perm in lifecycle true
8 verbose lifecycle myapp@1.0.0~build-cordova-android: PATH: C:\Users\CONRAD\AppData\Roaming\nvm\v8.9.4\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\CONRAD\test\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Brackets\command;%NVM_HOME%;%NVM_SYMLINK%;C:\Users\CONRAD\AppData\Roaming\npm;C:\Users\CONRAD\AppData\Roaming\npm;C:\Users\CONRAD\AppData\Roaming\nvm;C:\Program Files\nodejs
9 verbose lifecycle myapp@1.0.0~build-cordova-android: CWD: C:\Users\CONRAD\test
10 silly lifecycle myapp@1.0.0~build-cordova-android: Args: [ '/d /s /c',
10 silly lifecycle 'node ./build/build.js && cd cordova && cordova build android' ]
11 silly lifecycle myapp@1.0.0~build-cordova-android: Returned: code: 1 signal: null
12 info lifecycle myapp@1.0.0~build-cordova-android: Failed to exec build-cordova-android script
13 verbose stack Error: myapp@1.0.0 build-cordova-android: `node ./build/build.js && cd cordova && cordova build android`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\CONRAD\AppData\Roaming\nvm\v8.9.4\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\CONRAD\AppData\Roaming\nvm\v8.9.4\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid myapp@1.0.0
15 verbose cwd C:\Users\CONRAD\test
16 verbose Windows_NT 6.1.7600
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build-cordova-android"
18 verbose node v8.9.4
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error myapp@1.0.0 build-cordova-android: `node ./build/build.js && cd cordova && cordova build android`
22 error Exit status 1
23 error Failed at the myapp@1.0.0 build-cordova-android script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
解决方案
推荐阅读
- python - Python 请求 ConnectionErrorr [11001] getaddrinfo 失败
- html - 元素不垂直居中
- php - PHP上传脚本在某些设备上不起作用
- hibernate - Hibernate Search 和 Criteria Builder 更新
- javascript - 具有最高数字的 Javascript 变量
- javascript - Firebase:在反应中从firestore读取数据
- visual-studio - 是什么导致 NuGet 将包还原到略有不同的文件夹结构?
- datetime - 日期字符串无法在 Google 表格中解析为日期/时间
- regex - 正则表达式特定匹配
- pandas - 具有 NaN 值的先前 n 元素的 Pandas 滚动总和