Every line of 'unable to locate package nodejs' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
33 function findLocation(packageManagerFilePath, location, nodejsPath) { 34 var p = new Process(); 35 try { 36 if (nodejsPath) 37 p.setEnv("PATH", nodejsPath); 38 if (p.exec(packageManagerFilePath, [location, "-g"]) !== 0) 39 console.error(p.readStdErr().trim()); 40 return p.readStdOut().trim(); 41 } finally { 42 p.close(); 43 } 44 }