5

I'm trying to install typescript plugin from rollup plugins monorepo (actually a branch with a PR from this repo).

I guess the following command tries to install the whole repo:

npm install git+https://github.com/rollup/plugins.git.

It also fails at their disallow-npm.js, I guess a guard for this kind of thing.

How can I pull and install only one plugin from this monorepo?

cdalxndr
  • 1,435
  • 1
  • 15
  • 20
  • Does this answer your question? [Install package from lerna-managed monorepo via git URL](https://stackoverflow.com/questions/49064570/install-package-from-lerna-managed-monorepo-via-git-url) – Aleksi Mar 07 '22 at 05:14

1 Answers1

0

relating to your problem I found an article that talks about installation of NPM modules from Github repos:

How to install NPM modules from Github Repos

Being more accurate to your question, that repo has a Readme on each package that you can use to install the modules from that Github repo.

npm install @rollup/plugin-alias

The code about should be valid to install the module "plugin-alias" from that "rollup" repo.

I hope this helps to solve your problem, regards.

  • 1
    But how to install directly from github? I want to install a branch with a fix that hasn't been released yet. Note that this is a `monorepo` containing multiple plugins, not a simple repo. – cdalxndr Jul 15 '21 at 16:23
  • As the port says, you can use that command to install a whole repo: `npm install --save username/repo#branch-name-or-commit-or-tag` This way you will install all the modules from that repo. I hope that is what you are looking for and helps to clarify your comment. – Lorenzo Gómez Jul 16 '21 at 11:12
  • 3
    Unfortunately this doesn't help me. This command pulls all `monorepo` containing all plugins and fails to install. I want a single plugin. – cdalxndr Jul 18 '21 at 11:28
  • @LorenzoGómez you said "repo has a Readme on each package that you can use to install the modules from that Github repo", is that true? I browse to rollup legacy version at the date around your post, and didn't see such thing. it only had npm install from npm repo. https://github.com/rollup/plugins/tree/1cd7721ff12b03c951a4ca0516e868b80a52f302/packages/alias I m looking for a way to install packages of mono repo from GitHub Url, but so far I didn't find a possible way... – Wayne Mao Jun 05 '23 at 03:51