logdna / logdna/logger-node

Deno compatibility

Open
#81 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
36
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Can't use in deno:
error: Uncaught TypeError: socket.setTimeout is not a function
at RedirectableRequest.destroyOnTimeout (file:///Users/aymanalkait/Library/Caches/deno/npm/registry.npmjs.org/follow-redirects/1.15.2/index.js:158:12)
at RedirectableRequest.emit (ext:deno_node/_stream.mjs:1857:11)
at HttpsClientRequest.eventHandlers. (file:///Users/aymanalkait/Library/Caches/deno/npm/registry.npmjs.org/follow-redirects/1.15.2/index.js:14:24)
at HttpsClientRequest.emit (ext:deno_node/_stream.mjs:1857:11)
at node:http:388:18
at processTicksAndRejections (ext:deno_node/_next_tick.ts:25:21)
at runNextTicks (ext:deno_node/_next_tick.ts:71:5)
at eventLoopTick (ext:core/01_core.js:189:21)

I downgraded the package and found out it works only if i downgrade all the way to 1.2.0

However, even with 1.2.0 if the app is idle for sometime it crashes with the following similar exception:
Uncaught TypeError: socket.setTimeout is not a function

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported failure in Deno and inspect follow-redirects/index.js around RedirectableRequest.destroyOnTimeout at line 158. Compare the behavior with the working 1.2.0 version and test both immediate requests and the idle-connection case. Done means the logger client runs in Deno without the socket.setTimeout exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno, javascript, nodejs
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.