[TIMOB-11598] CLI: iOS: generated xcode project cannot find "node"
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-01-23T20:00:08.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 3.0.0, Release 3.1.0, 2012 Sprint 23 JS, 2012 Sprint 23, 2013 Sprint 02 JS |
| Components | CLI |
| Labels | 3.0.0beta2, build, ios, node, triage, xcode |
| Reporter | Martin Guillon |
| Assignee | Chris Barber |
| Created | 2012-10-17T16:22:32.000+0000 |
| Updated | 2017-03-21T20:43:02.000+0000 |
Description
When i generate a titanium mobile project and try to run it it wont build.
It tells me that it cant find "node"
If i change the prebuild command from
node "/usr/local/bin/titanium" build --platform iphone --sdk 3.1.0 --no-prompt --no-banner --xcode
exit $?
to
/usr/local/bin/node "/usr/local/bin/titanium" build --platform iphone --sdk 3.1.0 --no-prompt --no-banner --xcode
exit $?
Then it works.
Looking at log. In the xcode build process, PATH does not contain /usr/local/bin
Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3391 3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3392
i found out today that this fix is not enough. i found myself in sitations where: this.cli.argv.$0 = "node" this.cli.argv.$0 - "/usr/local/bin/node" So i had to fix it again https://github.com/Akylas/titanium_mobile/commit/6eb5588b18287db5a52322efc4cb9df5301c9dfe
@Martin, I see what you're saying. No prob, I'll get this fixed in a jiffy.
Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3767 3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3768 Comparison of code change: Before only works when this.cli.argv.$0 is "node /usr/local/bin/titanium".
If this.cli.argv.$0 has a full path to node, "node" is not stripped:After the fix, both work perfectly:@chris: that's it. thanks
Closing ticket as fixed.