Skip to content

Fix Node 24 readline regression in updatedb.js - #277

Closed
unicomp23 wants to merge 1 commit into
geoip-lite:mainfrom
airtimemedia:fix/node24-readline-regression
Closed

Fix Node 24 readline regression in updatedb.js#277
unicomp23 wants to merge 1 commit into
geoip-lite:mainfrom
airtimemedia:fix/node24-readline-regression

Conversation

@unicomp23

Copy link
Copy Markdown

!!! DO NOT DELETE THIS PR/BRANCH !!!

Used by eureka until node24 gets fixed.

Replace for await loops on readline with event-based readline to avoid ERR_USE_AFTER_CLOSE error on Node 24.2+ when processing files with >1025 lines.

See: nodejs/node#60507

🤖 Generated with Claude Code

Replace `for await` loops on readline with event-based readline
to avoid ERR_USE_AFTER_CLOSE error on Node 24.2+ when processing
files with >1025 lines.

See: nodejs/node#60507

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@airtimemedia airtimemedia closed this by deleting the head repository Dec 18, 2025
@exos

exos commented Apr 22, 2026

Copy link
Copy Markdown

What's happening with this PR? I have the same problem:

> node scripts/updatedb.js license_key=....

Checking  GeoLite2-Country-CSV.zip
Database country has new data
Fetching  GeoLite2-Country-CSV.zip
Retrieving GeoLite2-Country-CSV.zip ... DONE
Extracting GeoLite2-Country-CSV.zip ... DONE
Processing Lookup Data (may take a moment) ... DONE
Processing Data (may take a moment) ...
Still working (118173) ...
Still working (253149) ...
Still working (384757) ...
Still working (517931) ... DONE
Processing Data (may take a moment) ...
Still working (73597) ...
Still working (145994) ...
Still working (222856) ...
Still working (300673) ...
Still working (373217) ...
Still working (451923) ...
Still working (528623) ...
Still working (603725) ...node:internal/readline/interface:579
      throw new ERR_USE_AFTER_CLOSE('readline');
                 ^

Error [ERR_USE_AFTER_CLOSE]: readline was closed
    at Interface.resume (node:internal/readline/interface:579:13)
    at Object.next (node:events:1074:19)
    at processCountryData (/..../node_modules/geoip-lite/scripts/updatedb.js:432:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5) {
  code: 'ERR_USE_AFTER_CLOSE'
}

@bluesmoon

Copy link
Copy Markdown
Collaborator

@exos the original author deleted their branch before we could merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants