title: Binary from app using winston package don't run as linux service
body: <p>I have a very simple node js application that uses the npm Winston package.
  The code is only a loop printing date using the Winston package The app runs just fine. I created a binary using</p>
  <pre><code>npm run build
  </code></pre>
  <p>or</p>
  <pre><code>npx pkg -t linux,macos,win . --out-path dist
  </code></pre>
  <p>and it also runs just fine. the problem is that when I run it as a service using the file</p>
  <pre><code>[Unit]
  Description=Cryptween daemon service
  After=systend-user-sessions.service
  
  [Service]
  Type=simple
  WorkingDirectory=$CRYPTWEEN_BIN_DIR
  ExecStart=$CRYPTWEEN_BIN_DIR/cryptween-daemon-linux
  ExecReload=/bin/kill -HUP $MAINPID
  Restart=always
  StandardOutput=syslog
  StandardError=syslog
  SyslogIdentifier=CttWBot_Console
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  <p>I get the error</p>
  <pre><code>    cryptween.service - Cryptween daemon service
           Loaded: loaded (/etc/systemd/system/cryptween.service; enabled; vendor preset: enabled)
           Active: failed (Result: exit-code) since Thu 2022-03-24 10:54:45 -03; 1s ago
          Process: 213784 ExecStart=/opt/cryptween/bin/cryptween-daemon-linux (code=exited, status=1/FAILURE)
         Main PID: 213784 (code=exited, status=1/FAILURE)
      
      mar 24 10:54:45 gintama CttWBot_Console[213784]:     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
      mar 24 10:54:45 gintama CttWBot_Console[213784]:     at Module.load (node:internal/modules/cjs/loader:981:32)
      mar 24 10:54:45 gintama CttWBot_Console[213784]:     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
      mar 24 10:54:45 gintama CttWBot_Console[213784]:     at Module.require (node:internal/modules/cjs/loader:1005:19)
      mar 24 10:54:45 gintama CttWBot_Console[213784]:     at Module.require (pkg/prelude/bootstrap.js:1719:31)
      mar 24 10:54:45 gintama CttWBot_Console[213784]:     at require (node:internal/modules/cjs/helpers:102:18)
      mar 24 10:54:45 gintama CttWBot_Console[213784]:     at Object.&lt;anonymous&gt; (/snapshot/test-error-daemon/src/config/winston-logger.js:2:16)
      mar 24 10:54:45 gintama CttWBot_Console[213784]:     at Module._compile (pkg/prelude/bootstrap.js:1794:22)
      mar 24 10:54:45 gintama systemd[1]: cryptween.service: Main process exited, code=exited, status=1/FAILURE
      mar 24 10:54:45 gintama systemd[1]: cryptween.service: Failed with result 'exit-code'.
  </code></pre>
  <p>Here is the code:
  <a href="https://github.com/israel-gonzalezmedina/wiston-pdk-service" rel="nofollow noreferrer">code</a></p>
  <p>I am using ubuntu 20.04
  Thank you in advance</p>