Node - NODE_PATH

1 - About

NODE_PATH is a node environment variable where module will be searched by the module loader when using a:

Additionally, Node.js will search in the following list of GLOBAL_FOLDERS:
  • 1: $HOME/.node_modules
  • 2: $HOME/.node_libraries
  • 3: $PREFIX/lib/node ($PREFIX is Node.js's configured node_prefix.)

3 - Syntax

  • Linux

NODE_PATH=path[:…]

  • Windows

NODE_PATH=path[;…]

4 - Snippet


process.env.NODE_PATH = (process.env.NODE_PATH || '')
  .split(path.delimiter)
  .filter(folder => folder && !path.isAbsolute(folder))
  .map(folder => path.resolve(appDirectory, folder))
  .join(path.delimiter);

5 - Documentation / Reference


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap