我遵循了以下内容: https://docs.nativescript.org/tutorial/chapter-1#11-creating-apps 只有当我试图在cli中运行最后一个命令时才能创建演示应用程序hello world:
npm run build-ios-bundle -- --release --copy-to HalloWorld.ipa
为iOS构建项目并生成可分别在iOS模拟器或设备上手动部署的APP或IPA。 重要信息:在构建iOS设备之前,请确认您已在OS X系统上配置了一对有效的证书和配置文件。
子进程退出代码127
错误的ERR!达尔文16.0.0
错误的ERR! argv" /usr/local/Cellar/node/7.9.0/bin/node" "在/ usr / local / bin中/ NPM" "运行" " NS-束" " - IOS" " - 建立应用内" " - 释放" " - 复制到" " HalloWorld.ipa"
错误的ERR!节点v7.9.0
错误的ERR! npm v4.2.0
错误的ERR!文件sh
错误的ERR!代码ELIFECYCLE
错误的ERR!错误ENOENT
错误的ERR!系统调出生成
错误的ERR! @ ns-bundle:ns-bundle "HalloWorld.ipa"
错误的ERR!产生ENOENT
npm ERR!
错误的ERR! @ ns-bundle脚本失败&ns-ns-bundle" HalloWorld.ipa"'。
错误的ERR!确保安装了最新版本的node.js和npm
错误的ERR!如果这样做,这很可能是包裹的问题,
错误的ERR!不是npm本身。
错误的ERR!告诉作者你的系统失败了:
错误的ERR! ns-bundle" HalloWorld.ipa"
错误的ERR!您可以通过以下方式获取有关如何为此项目打开问题的信息:
错误的ERR! npm bug
错误的ERR!或者如果不可用,您可以通过以下方式获取信息:
错误的ERR! npm所有者ls
错误的ERR!上面可能有额外的日志输出。
错误的ERR!请在支持请求中包含以下文件:
错误的ERR! /Users/Hugo/.npm/_logs/2017-04-12T14_47_59_306Z-debug.log
错误的ERR!达尔文16.0.0
错误的ERR! argv" /usr/local/Cellar/node/7.9.0/bin/node" "在/ usr / local / bin中/ NPM" "运行" "建立-IOS束" " - " " - 释放" " - 复制到" " HalloWorld.ipa"
错误的ERR!节点v7.9.0
错误的ERR! npm v4.2.0
错误的ERR!代码ELIFECYCLE
错误的ERR! errno 1
错误的ERR! @ build-ios-bundle:npm run ns-bundle --ios --build-app "--release" "--copy-to" "HalloWorld.ipa"
错误的ERR!退出状态1
npm ERR!
错误的ERR! @ build-ios-bundle脚本失败&nbsp运行ns-bundle --ios --build-app" - release" " - 复制到" " HalloWorld.ipa"&#39 ;.
错误的ERR!确保安装了最新版本的node.js和npm
错误的ERR!如果这样做,这很可能是包裹的问题,
错误的ERR!不是npm本身。
错误的ERR!告诉作者你的系统失败了:
错误的ERR! npm运行ns-bundle --ios --build-app" - release" " - 复制到" " HalloWorld.ipa"
错误的ERR!您可以通过以下方式获取有关如何为此项目打开问题的信息:
错误的ERR! npm bug
错误的ERR!或者如果不可用,您可以通过以下方式获取信息:
错误的ERR! npm所有者ls
错误的ERR!上面可能有额外的日志输出。
错误的ERR!请在支持请求中包含以下文件:
错误的ERR! /Users/Hugo/.npm/_logs/2017-04-12T14_47_59_349Z-debug.log
调试日志
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/7.9.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build-ios-bundle',
1 verbose cli '--',
1 verbose cli '--release',
1 verbose cli '--copy-to',
1 verbose cli 'HalloWorld.ipa' ]
2 info using npm@4.2.0
3 info using node@v7.9.0
4 verbose run-script [ 'prebuild-ios-bundle',
4 verbose run-script 'build-ios-bundle',
4 verbose run-script 'postbuild-ios-bundle' ]
5 info lifecycle @~prebuild-ios-bundle: @
6 silly lifecycle @~prebuild-ios-bundle: no script for prebuild-ios-bundle, continuing
7 info lifecycle @~build-ios-bundle: @
8 verbose lifecycle @~build-ios-bundle: unsafe-perm in lifecycle true
9 verbose lifecycle @~build-ios-bundle: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/Hugo/Desktop/HelloWorld/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle @~build-ios-bundle: CWD: /Users/Hugo/Desktop/HelloWorld
11 silly lifecycle @~build-ios-bundle: Args: [ '-c',
11 silly lifecycle 'npm run ns-bundle --ios --build-app "--release" "--copy-to" "HalloWorld.ipa"' ]
12 silly lifecycle @~build-ios-bundle: Returned: code: 1 signal: null
13 info lifecycle @~build-ios-bundle: Failed to exec build-ios-bundle script
14 verbose stack Error: @ build-ios-bundle: `npm run ns-bundle --ios --build-app "--release" "--copy-to" "HalloWorld.ipa"`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:194:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:194:7)
14 verbose stack at maybeClose (internal/child_process.js:899:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid @
16 verbose cwd /Users/Hugo/Desktop/HelloWorld
17 error Darwin 16.0.0
18 error argv "/usr/local/Cellar/node/7.9.0/bin/node" "/usr/local/bin/npm" "run" "build-ios-bundle" "--" "--release" "--copy-to" "HalloWorld.ipa"
19 error node v7.9.0
20 error npm v4.2.0
21 error code ELIFECYCLE
22 error errno 1
23 error @ build-ios-bundle: `npm run ns-bundle --ios --build-app "--release" "--copy-to" "HalloWorld.ipa"`
23 error Exit status 1
24 error Failed at the @ build-ios-bundle script 'npm run ns-bundle --ios --build-app "--release" "--copy-to" "HalloWorld.ipa"'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error npm run ns-bundle --ios --build-app "--release" "--copy-to" "HalloWorld.ipa"
24 error You can get information on how to open an issue for this project with:
24 error npm bugs
24 error Or if that isn't available, you can get their info via:
24 error npm owner ls
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]
你能帮我吗,
此致
答案 0 :(得分:0)
我遇到了同样的问题,切换回节点6.11工作正常。