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

/usr/bin/env: node: No such file or directory #217

Open
binarykitchen opened this issue Jun 5, 2015 · 3 comments
Open

/usr/bin/env: node: No such file or directory #217

binarykitchen opened this issue Jun 5, 2015 · 3 comments

Comments

@binarykitchen
Copy link

Whenever I hit ALT-SHIFT-D to compile into JS, sublime shows me that above error:

/usr/bin/env: node: No such file or directory

But I already have the binDir specified in CoffeeScript.sublime-settings:

"binDir": "/home/michael-heuberger/npm/bin/"

which is correct because of:

$ which coffee
/home/michael-heuberger/npm/bin/coffee

And it's installed:

$ npm ls -g | grep coffee
├── [email protected]
└─┬ [email protected]
  ├── [email protected]

Using latest iojs here

$ iojs -v
v2.2.1

Any clues what's wrong?

@markalfred
Copy link
Contributor

This stackoverflow answer will likely be your solution. If you look at the top of your /home/michael-heuberger/npm/bin/coffee file, you should see the line

#!/usr/bin/env node

This is where the /usr/bin/env: node error is coming from.

One other potential issue:

Some OS's may refer to the node bin as nodejs. If that's the case, you should be able to run which nodejs and then symlink /usr/bin/node to that in the manner described in the stackoverflow above. Let me know if this helps!

@binarykitchen
Copy link
Author

Yes, I've read these discussions too but no luck.

Already have everything here and looks correct:

$ which node
/usr/bin/node
$ /usr/bin/env node
> 
(^C again to quit)
> 

Any other suggestions?

@binarykitchen
Copy link
Author

Also when I run that coffee script directly, it works:

# michael-heuberger at M2 in ~/npm/bin [9:25:35]
$ ./coffee
coffee> 
(^C again to quit)
coffee> 

# michael-heuberger at M2 in ~/npm/bin [9:25:39]
$ cat coffee
#!/usr/bin/env node

var path = require('path');
var fs   = require('fs');
var lib  = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');

require(lib + '/coffee-script/command').run();

# michael-heuberger at M2 in ~/npm/bin [9:25:50]
$ ./coffee
coffee> 

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

No branches or pull requests

2 participants