1

I am having difficulty installing a repo Pm2 fix which is forked to the original Pm2 original.

I have two question

  1. How can I npm install the pm2 fix using npm?
  2. After I have installed the pm2 fix using npm - am I able to still do npm update pm2 (original) if its being forked? If not, how can I be able to update the original pm2 repo if I install a pm2 fix from another repo that is being forked to the original one?
PythonNewbie
  • 1,031
  • 1
  • 15
  • 33

1 Answers1

4

The install from a git is answered here and for a specific branch:

npm install git+https://github.com/sbleon/pm2#fix-namespace-cli-option

Note that some modules with build processes might not work from git.

To keep up to date you would need to maintain your own fork of sbleon/pm2#fix-namespace-cli-option that merges in changes from the PM2 main branch. In this case from a remote master branch.

Matt
  • 68,711
  • 7
  • 155
  • 158
  • Oh alright, in that caseit make sense. What would you suggest to do? Basically the only change I need to is this part https://github.com/Unitech/pm2/compare/master...sbleon:fix-namespace-cli-option which is a really small code. Im not sure if its "allowed" to install from the pm2 original repo and then modify the code? Or what would you suggest be? – PythonNewbie Jul 23 '20 at 22:59
  • You will tend to lose local changes on a `yarn` or `npm` command that modifies pm2 so it's not a great solution. have you submitted the issue/pr to pm2? – Matt Jul 24 '20 at 00:53
  • Yes there is a PR but waiting for merge https://github.com/Unitech/pm2/pull/4791 – PythonNewbie Jul 24 '20 at 07:11