sublime3 配置node build环境
No matching processes belonging to you were found
/bin/sh: node: command not found
[Finished in 0.1s with exit code 127]
[cmd: ['killall node; node /Users/jachin/Project/Es6/src/Node/fs.js']]
[dir: /Users/jachin/Project/Es6/src/Node]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
在Sublime上添加了nodejs插件,本地也安装了node,配置也按照网上的说明写了
包括:
nodejs-sublime-build
{
"shell_cmd": "make",
"cmd": ["/usr/local/bin/node", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.js",
"shell":true,
"encoding": "utf-8",
"windows":
{
"cmd": ["taskkill /F /IM node.exe & node", "$file"]
},
"linux":
{
"cmd": ["killall node; node", "$file"]
}
}
nodejs-sublime-setting
{
// save before running commands
"save_first": true,
// if present, use this command instead of plain "node"
// e.g. "/usr/bin/node" or "C:\bin\node.exe"
"node_command": "/usr/local/bin/node",
// Same for NPM command
"npm_command": "/usr/local/bin/npm",
// as 'NODE_PATH' environment variable for node runtime
"node_path": false,
"expert_mode": false,
"ouput_to_new_tab": false
}
bashrc文件
# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
return
fi
PS1='\h:\W \u\$ '
# Make bash check its window size after a process completes
shopt -s checkwinsize
[ -r "/etc/bashrc_$TERM_PROGRAM" ] && . "/etc/bashrc_$TERM_PROGRAM"
#source ~/.nvm/nvm.sh
export PATH="$HOME/local/bin/node:$PATH"
#export PATH="~/.nvm/versions/node/v5.3.0/bin:$PATH"
**
但是还是报错,请问是为什么?是我地址配的不对还是环境变量配的不对咯?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
sublime text 3自带build的系统,只需要在
tools->build system-> new build system...
写入:
保存为
node.sublime-build
,就可以使用cmd+shift+b
调出窗口选择node
编译.在
keymap
绑定按键:就可以使用快捷键ctrl+c关闭,或者手动点选
tools-> cancel build
中断。需要编译es6的代码的话可以考虑用babel,build tools替换成