Reputation: 3593
I am trying to configure this plugin: https://github.com/tanepiper/SublimeText-Nodejs in Sublime Text 3.
I have this settings as a default ones:
{
// 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": false,
// Same for NPM command
"npm_command": false,
// as 'NODE_PATH' environment variable for node runtime
"node_path": true,
"expert_mode": false,
"output_to_new_tab": false
}
And then I have my user setting:
{
"node_path": "C:/Program Files/nodejs/"
}
I also checked and I have node in the Path, that can be accessed globally. I use Windows 10, and still, the output shows that this plugin cannot find node.exe:
ERROR: The process "node.exe" not found. module.js:557 throw err; ^
Can somebody help me with that? Thanks!
Upvotes: 1
Views: 1450
Reputation: 46
NODE_PATH
is using for setting paths where Nodejs will search modules to import in your code (see: https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders)
If you want to set path to the Nodejs executable you should use node_command
option instead of node_path
. Also, on Windows you should you use backslash as path separator NOT forward slash.
Upvotes: 2