DEV Community

Discussion on: Installing GitHub repos or Gists directly as npm packages

Collapse
 
paul_melero profile image
Paul Melero

Does this example work for you?

npm i github:lodash/lodash#semver:4.17.15

Remember, npm is expecting a package.json in the root of the Github repo.

Collapse
 
ryands17 profile image
Ryan Dsouza

Ohh. I forgot to mention I'm using yarn. Should it work with yarn as well?

Thread Thread
 
paul_melero profile image
Paul Melero

For repositories it should be yarn add <git remote url>. I don't know if it works for gists, though! I barely have used yarn 🙏🏽😉