Say you want to install a library lib-a which has dependencies dep-1 and dep-2. If lib-a has declared in its package.json
NPM install syntax:
npm install (with no args in a package dir)
npm install <tarball file>
npm install <tarball url>
npm install <folder>
npm install [@<scope>/]<name> [--save|--save-dev|--save-optional] [--save-exact]
npm install [@<scope>/]<name>@<tag>
npm install [@<scope>/]<name>@<version>
npm install [@<scope>/]<name>@<version range>
npm i (with any of the previous argument usage)
so you can choose one of these methods to install your modules.
The case of the simplest way to install a specific version is this one:
npm install module@0.0.2
more info: https://docs.npmjs.com/cli/install