I want to find where is my node.js in ubuntu linux system, the command: which node gives me the path of /usr/bin/node, but when I go to that folder, there i
If you have both Nodejs and npm installed correctly, just open your terminal:
Run: npm config ls -l
to see a set of configuration parameters that are internal to npm.
npm is configured from the following sources, sorted by priority:
--save-dev, --prefix, --global
npm_config_foo=bar
or NPM_CONFIG_FOO=bar
--allow-same-version
would be npm_config_allow_same_version=true
/path/to/my/project/.npmrc
$HOME/.npmrc
; also configurable via CLI option --userconfig
or environment variable $NPM_CONFIG_USERCONFIG
) $PREFIX/etc/npmrc
; also configurable via CLI option --globalconfig
or environment variable $NPM_CONFIG_GLOBALCONFIG
) /path/to/npm/npmrc
) For those who may be unfamiliar or new to Nodejs, npm and nvm the user needs to be aware that it's possible to have more then one version of Node on your system.
It's also possible to have Node stored both locally and globally.
With multiple versions and different locations it's possible that $ which node
may not give you the right location and if you run $ locate node
your gonna end up with too many locations to sort through.
Using the built-in Node/npm tools to locate Node seems to make the most sense.