Skip to content

New released version 6.0.6 causes error #5984

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

Open
jyoon006 opened this issue May 13, 2025 · 2 comments
Open

New released version 6.0.6 causes error #5984

jyoon006 opened this issue May 13, 2025 · 2 comments

Comments

@jyoon006
Copy link

jyoon006 commented May 13, 2025

Hello, the latest released version of 6.0.6 is causing below error. Can we please fix this

running pm2 in command line

Error: Cannot find module 'ansis'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/Users/jyoon/.nvm/versions/node/v10.23.3/lib/node_modules/pm2/constants.js:10:14)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

installing 6.0.5 seems to be ok

jeremyschlatter added a commit to jeremyschlatter/pm2 that referenced this issue May 13, 2025
Fixes Unitech#5984
Fixes Unitech#5983 (comment)

Also adds integrity hashes.

Created by running the following command:

    rm bun.lock package-lock.json && npm install --package-lock-only && bun install --lockfile-only
@webdiscus
Copy link
Contributor

Hello @jyoon006,

/Users/jyoon/.nvm/versions/node/v10.23.3/lib/node_modules/pm2/constants.js:10:14

You're using Node.js v10, which is outdated.
PM2 6.0.6 requires Node.js 16 or late:

package.json

"engines": {
    "node": ">=16.0.0"
 },

Upgrade to Node.js 16 or higher, e.g.:

nvm install 20

Install PM2 globally for each Node.js version used with NVM, e.g.:

nvm use 20
npm install -g pm2

@webdiscus
Copy link
Contributor

@jyoon006, @see365, @NurlanH

Version 6.0.8 fixes compatibility with Node.js 10+

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

No branches or pull requests

2 participants