How do I install the downloaded nodejs module?

  node.js, question

After I downloaded nodejs module on the Internet (not installed via command line npm install), such as mongodb module, how should I install it in the environment? I created a js file in the directory of the downloaded mongodb module and node ran it. It can run successfully, but it cannot run in other working directories. How should it be configured? Thank you all!

The landlord said the source code installation method.

Cd to downloaded module directory

Npm install < target path /-g >

It’s so spicy