【发布时间】:2014-03-23 19:57:35
【问题描述】:
我正在尝试使用 sublime-text 2,已经为 Windows 安装了 Nodejs,通过包控制安装了 Nodejs 插件,我收到以下错误:
错误:找不到进程“node.exe”。
文件名、目录名或卷标语法不正确。
[在 0.1 秒内完成,退出代码为 1]
我已将 NODE_PATH: C:\Program Files\nodejs\node.exe 设置为我的用户环境变量 我的系统变量 PATH 中有:C:\Program Files\nodejs\
我的 Nodejs.sublime-settings 设置如下:
{
// 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": "C:/Program Files/nodejs/node.exe",
// Same for NPM command
"npm_command": false,
// as 'NODE_PATH' environment variable for node runtime
"node_path": "C:/Program Files/nodejs/node.exe",
"expert_mode": false,
"ouput_to_new_tab": false
}
我的 Nodejs.sublime-build 设置如下:
{
"cmd": ["C:/Program Files/nodejs/node.exe", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.js",
"shell":true,
"encoding": "cp1252",
"windows":
{
"cmd": ["taskkill /F /IM node.exe & node", "$file"]
},
"linux":
{
"cmd": ["killall node; node", "$file"]
}
}
作为旁注,我正在使用 JSHint,它使用 Nodejs 使用相同的路径(即“C:/Program Files/nodejs/node.exe”)并且 JSHint 有效! 知道为什么我不能使用 Nodejs 构建系统吗? 谢谢
【问题讨论】:
标签: node.js build sublimetext2