Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[BUG] Max Listeners Exceeded warning

Open
#87 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
node.js, typescript
Domain
backend

Research direction

Reproduce with npm install, npm start init-store, npm start, then open localhost:8080 and mws-docs. Start at packages/server/src/streamer.ts:543 and trace the calls through WikiStateStore.ts:254, 328, 259, and 233. Done means mws-docs opens without the MaxListenersExceededWarning.

Written by the indexing model from the issue text.

Description

[BUG] Crash after Fresh Install on Windows

  • I did completely remove the MultiWikiServer directory.
  • git clone https://github.com/TiddlyWiki/MultiWikiServer.git -> OK
  • cd MultiWikiServer && npm install -> OK

npm start init-store

shows this:

PS E:\git\tiddly\tiddlywiki\MultiWikiServer> npm start init-store

> @tiddlywiki/[email protected] start
> node scripts.mjs start init-store

TSC dist/mws.d.ts
v22.14.0
Password master key created at E:\git\tiddly\tiddlywiki\MultiWikiServer\dev\wiki\passwords.key
DEV: Tiddler $:/plugins/tiddlywiki/tiddlyweb field plugin-priority was not a string
DEV: Tiddler $:/languages/de-AT field plugin-priority was not a string
DEV: Tiddler $:/languages/de-CH field plugin-priority was not a string
DEV: Tiddler $:/languages/de-DE field plugin-priority was not a string
DEV: Tiddler $:/languages/en-US field plugin-priority was not a string
DEV: Tiddler $:/languages/zh-CN field plugin-priority was not a string
DEV: Tiddler $:/languages/zh-Hans field plugin-priority was not a string
DEV: Tiddler $:/languages/zh-Hant field plugin-priority was not a string
DEV: Tiddler $:/languages/zh-HK field plugin-priority was not a string
DEV: Tiddler $:/languages/zh-TW field plugin-priority was not a string
DEV: Tiddler $:/plugins/mws/client field plugin-priority was not a string
New migrations found [
  '20250606001949_init',
  '20250613000526_remove_group',
  '20250620014502_settings',
  '20250707205229_recipes'
]
Applying migration 20250606001949_init
Applying migration 20250613000526_remove_group
Applying migration 20250620014502_settings
Applying migration 20250707205229_recipes
Migrations applied [
  '20250606001949_init',
  '20250613000526_remove_group',
  '20250620014502_settings',
  '20250707205229_recipes'
]
Default user created with username 'XXXX' and password 'XXXX'. Please change this password after logging in.
load-wiki-folder complete: E:\git\tiddly\tiddlywiki\MultiWikiServer\editions\mws-docs
load-wiki-folder complete: E:\git\tiddly\tiddlywiki\MultiWikiServer\node_modules\tiddlywiki\editions\tw5.com
load-wiki-folder complete: E:\git\tiddly\tiddlywiki\MultiWikiServer\node_modules\tiddlywiki\editions\dev
load-wiki-folder complete: E:\git\tiddly\tiddlywiki\MultiWikiServer\node_modules\tiddlywiki\editions\tour

npm start

shows this

> @tiddlywiki/[email protected] start
> node scripts.mjs start

TSC dist/mws.d.ts
v22.14.0
[ '--listener' ]
DEV: Tiddler $:/plugins/tiddlywiki/tiddlyweb field plugin-priority was not a string
DEV: Tiddler $:/languages/de-AT field plugin-priority was not a string
DEV: Tiddler $:/languages/de-CH field plugin-priority was not a string
DEV: Tiddler $:/languages/de-DE field plugin-priority was not a string
DEV: Tiddler $:/languages/en-US field plugin-priority was not a string
DEV: Tiddler $:/languages/zh-CN field plugin-priority was not a string
DEV: Tiddler $:/languages/zh-Hans field plugin-priority was not a string
DEV: Tiddler $:/languages/zh-Hant field plugin-priority was not a string
DEV: Tiddler $:/languages/zh-HK field plugin-priority was not a string
DEV: Tiddler $:/languages/zh-TW field plugin-priority was not a string
DEV: Tiddler $:/plugins/mws/client field plugin-priority was not a string
Listening on { address: '::1', family: 'IPv6', port: 8080 }
  • Open localhost:8080
  • LogIn as admin
  • Try to open mws-docs ERROR
(node:7192) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [Gzip]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
    at genericNodeError (node:internal/errors:983:15)
    at wrappedFn (node:internal/errors:537:14)
    at _addListener (node:events:592:17)
    at Gzip.addListener (node:events:610:10)
    at Gzip.Readable.on (node:internal/streams/readable:1128:35)
    at Gzip.once (node:events:654:8)
    at file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/packages/server/src/streamer.ts:543:55
    at new Promise (<anonymous>)
    at _Streamer.write (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/packages/server/src/streamer.ts:543:14)
    at writeTiddler (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/packages/mws/src/managers/WikiStateStore.ts:254:19)
    at _WikiStateStore.serveStoreTiddlers (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/packages/mws/src/managers/WikiStateStore.ts:328:7)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at _WikiStateStore.writeStoreTiddlers (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/packages/mws/src/managers/WikiStateStore.ts:259:5)
    at _WikiStateStore.serveIndexFile (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/packages/mws/src/managers/WikiStateStore.ts:233:7)
    at file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/packages/mws/src/managers/wiki-index.ts:100:7
    at Proxy._transactionWithCallback (E:\git\tiddly\tiddlywiki\MultiWikiServer\prisma\client\runtime\library.js:10368:15)
    at _StateObject.$transaction (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/packages/mws/src/RequestState.ts:44:12)
    at Object.handler (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/packages/mws/src/managers/wiki-index.ts:98:5)
    at _Router.handleRoute (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/packages/server/src/router.ts:163:7)
    at _Router.handleStreamer (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/packages/server/src/router.ts:114:14)
    at _Router.handleRequest (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/packages/server/src/router.ts:54:5)
Dominant language
TypeScript
Stars
60
Forks
16
PR merge metrics
No merged PRs in 30d

Getting set up

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.

More from TiddlyWiki/MultiWikiServer

All issues in TiddlyWiki/MultiWikiServer

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.