Skip to content

Instantly share code, notes, and snippets.

@phunguyen19
Created July 21, 2024 04:19
Show Gist options
  • Save phunguyen19/b61ce91fecf3932634a26641d0d9a274 to your computer and use it in GitHub Desktop.
Save phunguyen19/b61ce91fecf3932634a26641d0d9a274 to your computer and use it in GitHub Desktop.
Common NPM install package commedns

Public Npm Packages

npm install <package-name>

From Git

npm install git+ssh://[email protected]:npm/cli.git#v1.0.27
npm install git+ssh://[email protected]:npm/cli#pull/273
npm install git+ssh://[email protected]:npm/cli#semver:^5.0
npm install git+https://[email protected]/npm/cli.git
npm install git://github.com/npm/cli.git#v1.0.27
GIT_SSH_COMMAND='ssh -i ~/.ssh/custom_ident' npm install git+ssh://[email protected]:npm/cli.git

From local file

npm install ../../other-package --install-links
npm install ./sub-package

Detail document and npm install command to install modules https://docs.npmjs.com/cli/v10/commands/npm-install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment