exceptionless / Exceptionless.JavaScript

Exceptionless JavaScript client
http://exceptionless.com
Apache License 2.0
59 stars 24 forks source link

Using ExceptionlessClient causes Node script not to exit #139

Closed kareldonk closed 11 months ago

kareldonk commented 11 months ago

If I create the following script in a file called test.js:

main();

async function main() {
    const client = require('exceptionless').ExceptionlessClient.default;
    client.config.apiKey = 'API_KEY_HERE';
}

and then run the command node test.js on the command line, the script runs and does not exit back to the command line. Why is this happening? I would expect execution to stop after the last line in the main() function. Currently this is causing lambda functions on AWS to continue to stay active when in fact they are finished running.

niemyjski commented 11 months ago

What version of the client are you using? This looks like the first version, I'd recommend using the latest version which solves this.

kareldonk commented 11 months ago

Version 1.6.4 as listed here: https://www.npmjs.com/package/exceptionless Which version do you recommend using for nodejs and typescript projects?

ejsmith commented 11 months ago

Try this one: https://www.npmjs.com/package/@exceptionless/node

ejsmith commented 11 months ago

@niemyjski can we delist the old one?

niemyjski commented 11 months ago

@ejsmith I just deprecated it: https://www.npmjs.com/package/exceptionless

image