0

How do I view the current node_path? Is this in a configuration file?

The command node NODE_PATH causes error "Cannot find module".

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Michael Phelps
  • 3,451
  • 7
  • 36
  • 64
  • What "path" are you trying to find? The path where your node executable is installed? The path where NPM will install global modules to? The path where NPM will install local modules? The path where node will look for modules? Your current directory? – tkone Aug 21 '14 at 22:07
  • 3
    [`NODE_PATH`](http://nodejs.org/api/modules.html#modules_loading_from_the_global_folders) is an [environment variable](https://en.wikipedia.org/wiki/Environment_variable). These are generally configured within the operating system. See "[How to read environment variable in node.js](http://stackoverflow.com/questions/4870328/how-to-read-environment-variable-in-node-js)" for how to access them in a script. – Jonathan Lonowski Aug 21 '14 at 22:11
  • You can view the value of `NODE_PATH` by typing `echo $NODE_PATH` on the command line. – go-oleg Aug 22 '14 at 00:09

0 Answers0