Skip to main content

node_on_path

Function node_on_path 

Source
pub fn node_on_path() -> Option<PathBuf>
Expand description

Locate a node executable on PATH without spawning it (unlike probe_path_node, which runs node --version). Cheap enough to call on the hot install/run path to populate npm_node_execpath / NODE for lifecycle scripts when no runtime switch is active. Returns the first node (node.exe on Windows) on PATH as an absolute, executable path, or None if none qualifies.