node.js - Sublime [Errno 2] 没有这样的文件或目录 : 'node'

标签 node.js sublimetext3 sublime-jslint

在 sublime text 上,我在尝试验证 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

最佳答案

Sublime 找不到 Node ,因为它的 path 列表显示,它不在 /usr/local/bin 中查找。您需要修改设置以指向 /usr/local/bin/node,而不仅仅是 node,然后一切就绪。

关于node.js - Sublime [Errno 2] 没有这样的文件或目录 : 'node' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18014360/

相关文章:

sublimetext3 - 如何在 Sublime Text 3 中保存时运行命令?

sublimetext2 - 在 Sublime Text 2 中禁用或覆盖 JSLint 选项

javascript - 如何解析 Node.js 和 mongodb 查询中的对象数组?

javascript - 使用 npm 在 macOS 上安装 webpack

javascript - ES6 类方法返回未定义

java - Tyrus websocket 客户端 @OnMessage 从未调用过 - Storj 开源项目

go - 名称错误 : name 'go' is not defined in sublime text 3 console

python - Sublime Text : run code in a new file without saving to disk and the default language setting for a new file