question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

4.4.0 winston library exits process without error raised

See original GitHub issue

I used pkg for quite some time on version 4.3.8. My code does a require of the winston logging library. const logger = require("winston"); Since 4.4.0 this does not work anymore and as soon as the require is fired, the process exits with exit code 0.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

1reaction
danthegoodmancommented, Jul 16, 2019

@alessioerosferri I’ve been digging through issues posting my workaround, and while you don’t mention that you’re building on mac and targeting an x86 version of your platform, I’m going to assume you are since downgrading back to 4.3.8 fixed your issue.

The issue i’ve found has to do with pkg’s attempt to compile your app into binary into the exe instead of leaving it in source format.

Here are some workarounds I’ve found:

  1. Find a way to build and supply your own version of node, compiled in 32-bit mode. I have no idea how feasible this is.
  2. Build your pkg targeting a 32-bit machine from a windows machine with the 32-bit version of node
  3. Stop distributing a 32-bit version of your package.

Alternatively, if you’re comfortable with shipping your source code instead of having it compiled into a binary format, you can disable that feature by passing the following arguments to pkg:

--no-bytecode --public --public-packages '*'
1reaction
FabianTecommented, Jul 8, 2019

Having the exact same problem. I am reverting to 4.3.8 right now since 4.4.0 also has problems building for 32-bit packages.

Read more comments on GitHub >

github_iconTop Results From Across the Web

4.4.0 winston library exits process without error raised #732
I used pkg for quite some time on version 4.3.8. My code does a require of the winston logging library. const logger =...
Read more >
winston 3.3.3 (NPM Feed) - ProGet Home
winston is designed to be a simple and universal logging library with ... exitOnError, true, If false, handled exceptions will not cause process.exit....
Read more >
newrelic/NEWS.md - UNPKG
35, The agent now clears error references on transaction end, which are not used for later processing. Errors returned from 'axios' requests contain...
Read more >
Changelog - Cypress Documentation
With this change, cy.session() will no longer fail validation when false is returned from the validate callback. Fixes #21398, #24205, and #24593.
Read more >
Execution of commands and capturing output of shell scripts ...
CalledProcessError Exception raised when a process run by check_call() or check_output() returns a non-zero exit status. returncode Exit status of the child ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found