Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Sublime [Errno 2] No such file or directory: 'node'

Sublime [Errno 2] No such file or directory: 'node'

Problem

On Sublime text I'm getting following error while trying to validate JS.

[Errno 2] No such file or directory: 'node'
[cmd: ['node', '/Users/gurpreetsingh/Library/Application Support/Sublime Text 3/Packages/JSLint/linter.js', '--sloppy', '--indent', '2', '--node', '--nomen', '--vars', '--plusplus', '--stupid', '--todo', '/Users/gurpreetsingh/Documents/dev/aimia/infrastructure/endeavour-callcentre/endeavour-callcentre-web/src/main/webapp/js/modules/membervalidation.js']]
[dir: /Users/gurpreetsingh/Documents/dev/aimia/infrastructure/endeavour-callcentre/endeavour-callcentre-web/src/main/webapp/js/modules]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
[Finished]


//Additional Information 
Node version :v0.10.13
which node: /usr/local/bin/node
echo $PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin
Problem courtesy of: RuntimeException

Solution

Sublime can't find Node, because as its path listing shows, it's not looking in /usr/local/bin. You need to modify the settings to point to /usr/local/bin/node, not just node, and you'll be all set.

Solution courtesy of: MattDMo

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Sublime [Errno 2] No such file or directory: 'node'

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×