Skip to content

Install PM2 module from Github's non-master branch #2809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ma-zal opened this issue Apr 3, 2017 · 2 comments
Closed

Install PM2 module from Github's non-master branch #2809

ma-zal opened this issue Apr 3, 2017 · 2 comments

Comments

@ma-zal
Copy link
Contributor

ma-zal commented Apr 3, 2017

Installation of PM2 module from GitHub's non-master branch is failing.

Problem is, that PM2 is expecting, that final NPM module directory will be module#branchname, but real is without #branchname of course. So the PM2 finally stores the wrong name to module_conf.json -> module-db object.

Example:
pm2 install ma-zal/pm2-slack#own-customization

[PM2][Module] Installing module ma-zal/pm2-slack#own-customization
[PM2][Module] Calling [NPM] to install ma-zal/pm2-slack#own-customization ...
--- skiping some lines here ---
/home/nodejs/.pm2
└─┬ [email protected]  (git+https://github.com/ma-zal/pm2-slack.git#cee398d0ce8aeac02222a9686532331aff4bbd51)
--- skiping some lines here ---
[PM2][Module] Module downloaded
module.js:471
    throw err;
    ^

Error: Cannot find module '/home/nodejs/.pm2/node_modules/pm2-slack#own-customization/package.json'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at startModule (/usr/lib/node_modules/pm2/lib/API/Modules/Modularizer.js:33:22)
    at /usr/lib/node_modules/pm2/lib/API/Modules/Modularizer.js:158:9
    at /usr/lib/node_modules/pm2/lib/Configuration.js:64:14
    at FSReqWrap.oncomplete (fs.js:123:15)
pm2 --version
2.4.3
@ma-zal ma-zal changed the title Install modules from Github's non-master branch Install PM2 module from Github's non-master branch Apr 3, 2017
@vmarchaud
Copy link
Contributor

We should add something here to trim the name

@Unitech
Copy link
Owner

Unitech commented Apr 5, 2017

@ma-zal looks like a quick fix, feel free to open a PR on this
Basically we just pass arguments to npm

ma-zal added a commit to ma-zal/pm2 that referenced this issue Apr 19, 2017
…as Github repository with non-master branch. Fixed the broken upgrade of modules specified by Github source (old version was not been removed, therefore two instances existed in memory after upgrade).
@Unitech Unitech closed this as completed in b8b6151 Jun 9, 2017
inerc pushed a commit to inerc/pm2 that referenced this issue Feb 11, 2020
…as Github repository with non-master branch. Fixed the broken upgrade of modules specified by Github source (old version was not been removed, therefore two instances existed in memory after upgrade). (Unitech#2840)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants