diff --git a/src/service/daemon.ts b/src/service/daemon.ts index d961bafb4..bf97a5235 100644 --- a/src/service/daemon.ts +++ b/src/service/daemon.ts @@ -59,9 +59,10 @@ function _start (options: any) { starts += 1 // Fork the child process piping stdin/out/err to the parent - // NOTE: ADDING process.argv[1] as first arg to the spawned process is a workaround to fix a pkg bug + // NOTE: ADDING process.pkg.entrypoint as first arg to the spawned process is a workaround to fix a pkg bug // https://github.com/vercel/pkg/issues/1356 - child = spawn(options.processExec, [process.argv[1], 'start'].concat(process.argv.slice(2)), { + // @ts-ignore + child = spawn(options.processExec, [process.pkg.entrypoint, 'start'].concat(process.argv.slice(2)), { env: process.env })