From 9a9407d8f40662497ae397adcd55fe692a8b4922 Mon Sep 17 00:00:00 2001 From: Kyle Zhang Date: Fri, 18 Oct 2019 18:42:46 +0800 Subject: [PATCH] [Docs] make global packages requirable --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 9cab0ba..ecdcdda 100644 --- a/README.md +++ b/README.md @@ -717,6 +717,12 @@ nvm install -s 0.8.6 ``` - If setting the `default` alias does not establish the node version in new shells (i.e. `nvm current` yields `system`), ensure that the system's node `PATH` is set before the `nvm.sh` source line in your shell profile (see [#658](https://github.com/nvm-sh/nvm/issues/658)) + + - If you want to make packages in the global `node_modules` requirable, you can add `NODE_PATH` to path environment which makes it a possible path to resolve packages. + +```sh +export NODE_PATH="$(npm config get prefix)/lib/node_modules" +``` ## Mac OS "troubleshooting"