Home Download Buy Blog Forum Support

coffeescript build issues

coffeescript build issues

Postby ceej on Mon Jul 25, 2011 7:50 pm

So I have:
Code: Select all
{
   "cmd": ["/usr/local/bin/coffee", "$file"],
   "selector": "source.coffee"
}

But when I run it I get [Finished]env: node: No such file or directory
If I run it in the terminal normally it works just fine.... any ideas?

Many thanks
ceej
 
Posts: 81
Joined: Tue Jun 21, 2011 5:37 pm

Re: coffeescript build issues

Postby ceej on Thu Aug 04, 2011 2:40 pm

any ideas?
ceej
 
Posts: 81
Joined: Tue Jun 21, 2011 5:37 pm

Re: coffeescript build issues

Postby jps on Thu Aug 04, 2011 3:08 pm

It looks like node isn't in the path that Sublime Text 2 is using. You can verify this by typing in the console:

Code: Select all
import os
os.environ["PATH"]


This is a common issue on OS X, take a look at http://stackoverflow.com/questions/1356 ... es-in-os-x for example.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: coffeescript build issues

Postby ceej on Thu Aug 04, 2011 3:17 pm

Hi, thank you for the reply.

It looks like the issue:

>>> import os
>>> os.environ["PATH"]
'/usr/bin:/bin:/usr/sbin:/sbin'

It doesn't have the correct path which is /usr/local/bin I have export PATH="/usr/local/bin:$PATH" in my ~/.profile so I wonder why it isn't using that? Is there a way I can set the path in sublime?

Many thanks
ceej
 
Posts: 81
Joined: Tue Jun 21, 2011 5:37 pm

Re: coffeescript build issues

Postby ceej on Thu Aug 04, 2011 5:09 pm

so I added this to my profile alias s='open -a "Sublime Text 2"' and now if I use s . in my terminal it works and use the right path but using it directly from applications it doesn't.
ceej
 
Posts: 81
Joined: Tue Jun 21, 2011 5:37 pm

Re: coffeescript build issues

Postby lukasbob on Fri Aug 05, 2011 6:04 am

I would try putting it in the file ~/.MacOSX/environment.plist, like one of the responses on stack overflow suggests. If that file does not exist, create it. You will have to log out and back in for the environment variables to take effect.
lukasbob
 
Posts: 6
Joined: Wed Feb 23, 2011 7:38 pm

Re: coffeescript build issues

Postby rulfzid on Fri Aug 05, 2011 9:19 pm

don't build commands take a 'path' argument?

Like so:

Code: Select all
{
   "cmd": ["/usr/local/bin/coffee", "$file"],
   "selector": "source.coffee",
   "path": "/usr/local/bin:$PATH"
}
rulfzid
 
Posts: 9
Joined: Thu Aug 20, 2009 10:06 pm

Re: coffeescript build issues

Postby andrewmartin on Sat Jun 08, 2013 9:24 pm

I fixed this by editing my CoffeeCompile.sublimesettings file:
Code: Select all
    "coffee_executable": "/usr/local/bin/coffee",
    "node_path": "/usr/local/bin"
andrewmartin
 
Posts: 2
Joined: Fri Apr 26, 2013 3:51 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], karstenfk and 32 guests