2015-12-21 62 views
0

這表明不能在Windows與崇高的文本2運行節點

節點二進制不能在PATH中找到

考慮使用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"] 
    } 

回答

0

您需要調整,像這樣的路徑:

"node_command": "C:\\Program Files\\nodejs\\node", 
"npm_command": "C:\\Program Files\\nodejs\\npm", 

注雙反斜線\\作爲目錄deliminators。當您在C:之後用雙反斜槓啓動路徑時,Sublime預計所有刪除器都是雙反斜槓。或者,你可以讓他們所有的單斜槓:

"node_command": "C:/Program Files/nodejs/node", 
"npm_command": "C:/Program Files/nodejs/npm", 

至於你PATH而言,你應該從C:\Program Files\nodejs\刪除尾隨\。這可能是Sublime不檢查該目錄的原因。