Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

None of the plugin commands work #15

Open
dangerbell opened this issue Sep 6, 2012 · 7 comments
Open

None of the plugin commands work #15

dangerbell opened this issue Sep 6, 2012 · 7 comments
Labels

Comments

@dangerbell
Copy link

I cannot get any of the commands for this plugin to work. Any time I try to do something like check syntax (Alt+Shift+S) nothing happens and I get this line in the status bar:
"Syntax env: node: No such file or directory"

I'm on OS X 10.8.1

I assumed this was a path problem, but the Sublime path and my system path match:

import os
os.environ["PATH"]
'/usr/local/mysql/bin:/usr/local/share/npm/bin:/Users/greg/.rvm/gems/ruby-1.9.3-p194/bin:/Users/greg/.rvm/gems/ruby-1.9.3-p194@global/bin:/Users/greg/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/greg/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/greg/.rvm/bin:$HOME/bin'

In the command line:

which node
/usr/local/bin/node

So 'node' should be on the path.

I had a similar problem with not being able to find 'coffee', but I was able to resolve that after finding 'binDir' in 'CoffeeScript.sublime-settings'. It defaults to '/usr/local/bin' while the directory 'coffee' is in is '/usr/local/share/npm/bin'.

I installed 'coffee' the recommended way:
npm install -g coffee-script

And I installed 'node' with:
brew install node

@Xavura
Copy link
Collaborator

Xavura commented Sep 7, 2012

Really sounds like some form of PATH problem to me, I'll look into it but it works for most people including me and I'm on OS X 10.8.1.

I believe I installed npm and node the same way. I'll look into it.

@kdavh
Copy link

kdavh commented Oct 9, 2012

Hi!
@dangerbell
Here is a fix.
I was having the same trouble, I installed coffeescript the same way, and I'm using 10.8.2.
I once I changed my coffeescript.sublime-build "binDir" variable to /usr/local/share/npm/bin, I got the same error as you: it couldn't find node
So I made another symlink to my original coffeescript bin using the terminal:
ln -s /usr/local/share/npm/lib/node_modules/coffee-script/bin/coffee /usr/local/bin/coffee
And I changed my "binDir" back to the default /usr/local/bin .
My guess is that Xavura's sublime text coffeescript plugin needs to access both coffee and node binaries, and they need to be in the same folder (since there's only one "binDir" variable.
I am very new to these things, but it seemed to work. I can check syntax with the key shortcuts, etc.

@Xavura
I wonder though, is there any way to have the output display besides in the one line status bar? I assumed it would have been printed in the console for a more permanent log. I apologize in advance if this is an obvious question, I'm still getting familiar with all of this stuff.

@Xavura
Copy link
Collaborator

Xavura commented Nov 29, 2012

@dangerbell This isn't the first time someone has had problems with paths so I'll look into improving this.

@kdavh Display what exactly in the status bar? It's possible, I'm sure some things use the status bar already. You should open another issue. :)

@pablobm
Copy link

pablobm commented Feb 27, 2013

I had the same problem. I solved it by putting both paths (coffee's and node's) on my binDir, as follows:

"binDir": "/usr/local/share/npm/lib/node_modules/coffee-script/bin:/usr/local/bin"

Note that the paths are separated by a colon symbol (":"), as normally expected from library paths.

@leachryanb
Copy link

I am running node 0.10.1 with npm 1.2.15 and it installs coffee to /usr/local/share/npm/bin. So this worked for me:
CoffeeScript.sublime-settings:
"binDir": "/usr/local/share/npm/bin:/usr/local/bin"

@dangerbell
Copy link
Author

Adding both the location of the coffee command and node to the "binDir" variable fixed this for me.

@jabney
Copy link

jabney commented Jul 9, 2013

It looks like Node installs a link "node" in /usr/local/bin which is the default for "binDir" in Packages/CoffeeScript/CoffeeScript.sublime-settings. CoffeeScript does not create a link there. I opted to follow kdavh's advice above to create a symbolic link: "ln -s /Users/me/.npm/coffee-script/1.6.3/package/bin/coffee /usr/local/bin/coffee" and it worked like a charm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants