【发布时间】:2015-12-21 07:48:31
【问题描述】:
说明
在 PATH 中找不到节点二进制文件
考虑使用 Node 插件的 node_command 设置
为什么找不到我的环境变量,which is in the PATH(in the third and fourth line from the bottom)
这是我的设置
{
// 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"
// e.g. "/usr/bin/node" or "C:\bin\node.exe"
"node_command": "C:\\Program Files\nodejs\node",
// Same for NPM command
"npm_command": "C:\\Program Files\nodejs\npm",
// as 'NODE_PATH' environment variable for node runtime
//"node_path": false,
"expert_mode": false,
"ouput_to_new_tab": false
}
这是我的构建
"cmd": ["node", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.js",
"shell":true,
"encoding": "cp936",
"windows":
{
"cmd": ["taskkill","/F", "/IM", "node.exe","&","node", "$file"]
},
"linux":
{
"cmd": ["killall node; node", "$file"]
}
【问题讨论】:
标签: node.js sublimetext2