jessety / pm2-installer

Install PM2 offline as a service on Windows or Linux. Mostly designed for Windows.
MIT License
494 stars 50 forks source link

Offline install error #91

Open mvitcostal opened 1 year ago

mvitcostal commented 1 year ago

Description

During offline install an error is thrown. It seems one package does not get installed. PM2 gets installed and service gets started but logs show pm2-logrotate errors

Steps to Reproduce

  1. build offline bundle
  2. npm run setup

Environment

Linux 6.1.21-v7l+ node v18.16.0 npm v9.5.1

====================================================================== Here is the error thrown

979 timing reify:rollback:retireShallow Completed in 0ms 980 timing command:install Completed in 10776ms 981 verbose stack Error: request to https://registry.npmjs.org/pm2/-/pm2-5.3.0.tgz failed: cache mode is 'only-if-cached' but no cached response is available. 981 verbose stack at cacheFetch (/usr/lib/node_modules/npm/node_modules/make-fetch-happen/lib/cache/index.js:12:13) 981 verbose stack at async fetch (/usr/lib/node_modules/npm/node_modules/make-fetch-happen/lib/fetch.js:98:7) 982 verbose cwd /tmp/pm2-installer-main 983 verbose Linux 6.1.21-v7l+ 984 verbose node v18.16.0 985 verbose npm v9.5.1 986 error code ENOTCACHED 987 error request to https://registry.npmjs.org/pm2/-/pm2-5.3.0.tgz failed: cache mode is 'only-if-cached' but no cached response is available. 988 verbose exit 1 989 timing npm Completed in 10897ms 990 verbose unfinished npm timer reify 1694850097480 991 verbose unfinished npm timer reify:unpack 1694850101382 992 verbose unfinished npm timer reifyNode:node_modules/@jessety/pm2-logrotate/node_modules/pm2 1694850101410 993 verbose code 1 994 error A complete log of this run can be found in: 994 error /tmp/pm2-installer-main/.npm_cache/_logs/2023-09-16T07_41_37_364Z-debug-0.log

mvitcostal commented 1 year ago

sudo pm2 logs shows following error ` code: 'MODULE_NOT_FOUND', at Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39) { at Module.require (node:internal/modules/cjs/loader:1141:19) at Module._load (node:internal/modules/cjs/loader:958:12) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) at Module._compile (node:internal/modules/cjs/loader:1254:14) at Object. (/root/.pm2/modules/pm2-logrotate/node_modules/pm2/lib/API.js:1923:1) at require (node:internal/modules/cjs/helpers:110:18) at Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:81:25) at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)