how to print NODE_PATH
if (!process.env.NODE_PATH) {
console.log();
if (process.env.SHELL === '/bin/zsh') {
console.log(' Please set environment variable NODE_PATH in ~/.zshrc:');
} else if (process.env.SHELL === '/bin/bash') {
console.log(' Please set environment variable NODE_PATH in ~/.bashrc:');
} else {
console.log(' Please set environment variable NODE_PATH:');
}
console.log();
var nodepath = __dirname.replace(/(\/|\\)nico(\/|\\)bin$/, '');
if (/node_modules$/.test(nodepath) && !fs.existsSync(path.join(nodepath, '.bin'))) {
if (os.platform() === 'win32') {
console.log(' NODE_PATH=' + nodepath);
} else {
console.log(' export NODE_PATH=' + nodepath);
}
}
console.log();
process.exit();
}
Also in JavaScript:
- mdn js sort
- responsive grid using antd
- js array.pop
- prevent form submission using jquery
- javascript regex single line
- leap year in javascript
- js console log input value
- mule 4 json to string json
- align text center react native
- node.js
- count number of times an element is occuring in an array in javascript
- merge two strings with alternate characters javascript
- how to update firebase document field angular
- p5 js lines
- how to run resize event only on client side angular
- javascript loop over classlist
- javascript array filter
- how to verify json format is valid
- remove first element from array javascript
- javascript alert
- javascript filter array of objects by key
- javascript print
- online javascript compiler
- javascript element by class