Open p1k2i opened 7 months ago
My package-lock.json
of the project also includes lru-cache and semver. I am not sure, maybe it can affect?
"node_modules/lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dependencies": {
"yallist": "^4.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/semver": {
"version": "5.7.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"bin": {
"semver": "bin/semver"
}
},
What's going wrong?
Cannot start nodejs application with command
pm2 start dist/app.js --node-args="-r tsconfig-paths/register"
How could we reproduce this issue?
I can create new repository with a simple project demostrating the problem if needed.
Supporting information
I can start the same application successfully from console if I put the command
node -r tsconfig-paths/register dist/app.js
, so it looks like a problem with pm2. I tried different versions o node, npm and pm2 - is the same. It was working before on a production server, but not anymore and I don't understand what happens.ChatGPT-4 answer: "The error message you're seeing indicates that there's a problem with the LRU (Least Recently Used) cache in the semver module that pm2 is using. It's possible that there's a version mismatch issue between the semver and lru-cache packages."