How does this work?
Very little explanation as to how to use this plugin, so I'm unsure as to if I'm doing something incorrectly. I drop the folder that titanium create created into my sublime project (unsaved projected FYI), and then I run Cmd+B making sure that Titanium is the build system selected. All I get is something like: env: node: No such file or directory [Finished in 0.0s with exit code 127] output into the console.
How is this plugin suppose to work?
I'm running OS X ML, Sublime Text 2 and Titanium 3.x installed from Studio.
I keep getting this error when running this plugin and choosing ios > simulator > iphone
env: node: No such file or directory
I'm not sure what's wrong.
I've had to open Sublime from the terminal for certain commands due to the way paths are setup. I use subl . to launch sublime for the current directory.
http://www.sublimetext.com/docs/2/osx_command_line.html
Are there plans for fixing this? What is the issue with paths when not opening from command line?
I encountered exactly the same problem with this - in the end I fixed it by creating an alias for sublime - eg: in terminal:
alias sublime="open -a /Applications/Sublime\ Text\ 2.app"
and using this to open Sublime then the build process will work. I found the details here: https://gist.github.com/artero/1236170 and the simpler approach I used above was suggested in the comments
I can confirm this issue.
I don't want to keep opening my terminal just to open sublime-text. Is there anyway to fix this? What is the issue with the paths when not opening from command line?
Try using something like launchctl setenv PATH $PATH to set your environment variables on OSX. I just found out about this the other day so hopefully it helps. There may be other environment variables for Node that I'm not aware of.
I can confirm. Any other help? Very excited to use.
I'm not understanding the problem here. Could someone explain to me what's going on behind the scens with ST and why it works when launching ST from terminal using subl and why it doesn't work when launching from the app icon?
OSX is weird in that the paths set in the terminal are different than the ones use for visual apps. NodeJS is usually the reason it fails because OSX can't find it on the visual app PATH. By default it uses /usr/local/bin which is not included by default in OSX apps.
Apple has some information here on how you can setup an environment variables file in ~/.MacOSX/environment.plist.
https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html
Oddly, ~/.MacOSX is not a directory on my machine.
None of the solutions work. I tried using launchctl to set the PATH environment variable, which it looks like it (launchctl getenv PATH tells me so), but opening ST and running the build commands still gives me the same error as above. I tried editing /etc/launchd.conf with the PATH I want and restarted my machine, and yet that doesn't work. The plist option I can't do cause I don't have the .MacOSX dir in my home dir. Also, I've read that configuring this plist wont work for apps opened in Spotlight.
The only thing that works is subl . as mentioned. I guess I'll just have to use this when starting my Titanium development for now.
Same here, is this going to get fixed?
Do the following before starting Sublime Text:
export NODE=/usr/local/bin/node
just create a symbol link of node to /usr/bin
sudo ln -s /usr/local/bin/node /usr/bin/node´
It'll work properly.
thanks @yomybaby ! :)