You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Uncaught 'TypeError: once is not a function' ×5 at every cc startup — chokidar's readdirp stream has .on but not .once, breaking the file watcher #9680
Found during #9673's investigation. Fires 5× on every claude-code startup, uncaught.
Real frame (verified, not a #9521 name-borrow): chokidar's _handleRead does j.on(…).on(…) on the readdirp stream — which works — then j.once(…) throws, because the stream object perry hands back has on but not once.
Consequence: cc's file watcher fails to initialise on every run. That is its own defect, and it may also be why watch-dependent behaviour looks inconsistent under perry.
The likely shape is a stream/EventEmitter surface that implements a subset of the emitter API — once is the classic omission because it is usually implemented in terms of on + self-removal. Check what readdirp returns under perry versus node and diff the method surface (Object.getOwnPropertyNames on the object and its prototype chain), then implement the missing members rather than just once — a partial emitter will keep producing this class of failure.
Verification: fixture creating the same readdirp-style stream and asserting the full node emitter surface (on, once, off, removeListener, emit, prependListener, prependOnceListener, listenerCount, eventNames), byte-compared to node; plus the cc-level check that startup produces zero uncaught TypeErrors and the watcher initialises.
Activity