Skip to content
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

fix allowing to update namespaced pm2 NPM module (@org/module-name) #5915

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

endel
Copy link

@endel endel commented Nov 13, 2024

This PR fixes the issue when trying to run pm2 install @colyseus/tools the second time:

Error:

Error: ENOENT: no such file or directory, mkdir '/tmp/@colyseus/tools'
    at Object.mkdirSync (node:fs:1371:26)
    at copydirSync (/usr/lib/node_modules/pm2/lib/tools/copydirSync.js:38:14)
    at Object.backup (/usr/lib/node_modules/pm2/lib/API/Modules/NPM.js:438:5)
    at /usr/lib/node_modules/pm2/lib/API/Modules/NPM.js:170:16
    at moduleExistInLocalDB (/usr/lib/node_modules/pm2/lib/API/Modules/NPM.js:162:10)
    at Object.install (/usr/lib/node_modules/pm2/lib/API/Modules/NPM.js:166:3)
    at Modularizer.install (/usr/lib/node_modules/pm2/lib/API/Modules/Modularizer.js:48:9)
    at CLI.install (/usr/lib/node_modules/pm2/lib/API/Modules/index.js:27:17)
    at Command.<anonymous> (/usr/lib/node_modules/pm2/lib/binaries/CLI.js:503:9)
    at Command.listener (/usr/lib/node_modules/pm2/node_modules/commander/index.js:315:8) {

The recursive option for mkdirSync is available since Node.js 10.12.0. So this change should be safe for everybody.

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes

@CLAassistant
Copy link

CLAassistant commented Nov 13, 2024

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants