'Is there any way to force node/npm to use globally installed modules, if both global and local versions exist?

As I understand it, if a NPM module is installed both globally and locally, then the local version is the one that will get used.

Is there any way to force use of the global version, if both exist?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source