ti.alloy plugin exception on run command
Closed this issue · 2 comments
The alloy plugin is looking for the node and alloy binaries under /usr/local/bin but on my machine they are installed under /opt/local/bin which basically throws out a bunch of python exception when run.
2012-07-16 17:34:11 -- [INFO ] Detected compiler plugin: ti.alloy/1.0
2012-07-16 17:34:11 -- [INFO ] alloy app found at /Users/rix/Documents/Titanium_Studio_Workspace/Asset Mobile/app
2012-07-16 17:34:11 -- [ERROR] Error: Traceback (most recent call last):
2012-07-16 17:34:11 -- [DEBUG] File "/Library/Application Support/Titanium/mobilesdk/osx/2.1.0.GA/iphone/builder.py", line 1117, in main
2012-07-16 17:34:11 -- [DEBUG] p.compile(compiler_config)
2012-07-16 17:34:11 -- [DEBUG] File "/Users/rix/Documents/Titanium_Studio_Workspace/Asset > Mobile/plugins/ti.alloy/plugin.py", line 36, in compile
2012-07-16 17:34:11 -- [DEBUG] subprocess.check_call(cmd)
2012-07-16 17:34:11 -- [DEBUG] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 457, in check_call
2012-07-16 17:34:11 -- [DEBUG] retcode = call(_popenargs, *_kwargs)
2012-07-16 17:34:11 -- [DEBUG] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 444, in call
2012-07-16 17:34:11 -- [DEBUG] return Popen(_popenargs, *_kwargs).wait()
2012-07-16 17:34:11 -- [DEBUG] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in init
2012-07-16 17:34:11 -- [DEBUG] errread, errwrite)
2012-07-16 17:34:11 -- [DEBUG] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
2012-07-16 17:34:11 -- [DEBUG] raise child_exception
2012-07-16 17:34:11 -- [DEBUG] OSError: [Errno 2] No such file or directory
My machine
OSX: 10.6.8
Python 2.6.1
Titanium 2.1.0.GA
@rixrix a quick workaround would be to create a symbolic link from your installation of node to the directory where it is expected to be, which is /usr/local/bin/node
. You could also modify the ti.alloy plugin in your project to use the path on your system. These problems should disappear when we get TiStudio integration with Alloy, but I'll look for a better way to detect the node installation path in the meantime.
Thanks @tonylukasavage for the symlink suggestion. I also had to rm /usr/local/bin/alloy
in favor of /Users/micahalcorn/nvm/v0.8.8/bin/alloy
. Obviously my placement issue is affected by NVM, which appears to be the preferred method of installation these days.