pm2 icon indicating copy to clipboard operation
pm2 copied to clipboard

pm2 package as a single binary

Open utsavkapoor opened this issue 2 years ago • 0 comments

I use pm2 for a non node environment, and do not want to install node and npm, then I try to package this into a single binary with pkg tool, but fail.

As per: 4505 single binary can be build using https://getpm2.com/ but the website not available anymore. Can I get the instructions for this ?

some info:

pkg /usr/local/lib/node_modules/pm2/bin/pm2 -t node-linux-x64

[email protected] Warning Cannot resolve 'confPath' /usr/local/lib/node_modules/pm2/lib/Common.js Dynamic require may fail at run time, because the requested file is unknown at compilation time and not included into executable. Use a string literal as an argument for 'require', or leave it as is and specify the resolved file name in 'scripts' option. Warning Cannot resolve 'path.resolve(filename)' /usr/local/lib/node_modules/pm2/lib/Common.js Dynamic require may fail at run time, because the requested file is unknown at compilation time and not included into executable. Use a string literal as an argument for 'require', or leave it as is and specify the resolved file name in 'scripts' option. Warning Cannot resolve 'package_file' /usr/local/lib/node_modules/pm2/lib/API/Modules/NPM.js Dynamic require may fail at run time, because the requested file is unknown at compilation time and not included into executable. Use a string literal as an argument for 'require', or leave it as is and specify the resolved file name in 'scripts' option. Warning Cannot resolve 'opts.cmd || opts.package' /usr/local/lib/node_modules/pm2/lib/API/Modules/NPM.js Dynamic require may fail at run time, because the requested file is unknown at compilation time and not included into executable. Use a string literal as an argument for 'require', or leave it as is and specify the resolved file name in 'scripts' option. Warning Cannot resolve 'path.join(module_path, 'package.json')' /usr/local/lib/node_modules/pm2/lib/API/Modules/TAR.js Dynamic require may fail at run time, because the requested file is unknown at compilation time and not included into executable. Use a string literal as an argument for 'require', or leave it as is and specify the resolved file name in 'scripts' option. ./pm2 pkg/prelude/bootstrap.js:1185 throw error; ^

ReferenceError: source is not defined at Object. (/snapshot/pm2/constants.js:1:63) at Module.install.Module._compile (/snapshot/pm2/node_modules/v8-compile-cache/v8-compile-cache.js:192:30) at Object.Module._extensions..js (module.js:662:10) at Module.load (module.js:564:32) at tryModuleLoad (module.js:504:12) at Function.Module._load (module.js:496:3) at Module.require (module.js:595:17) at Module.require (pkg/prelude/bootstrap.js:1166:31) at require (internal/module.js:11:18) at Object. (/snapshot/pm2/bin/pm2:0:0)

utsavkapoor avatar Jul 25 '22 18:07 utsavkapoor