microsoft/typescript-go · error
unable to open pipe: %w
Error message
unable to open pipe: %w
What it means
Error "unable to open pipe: %w" thrown in microsoft/typescript-go.
Source
Thrown at internal/fswatch/kqueue.go:164
b.pipeWriteFD.Store(-1)
b.watcherBase.init(b)
return b
}
func (b *kqueueBackend) start() error {
kq, err := unix.Kqueue()
if err != nil {
return fmt.Errorf("unable to open kqueue: %w", err)
}
b.kq = kq
defer func() {
b.closeSubscriptions()
b.closeFDs()
close(b.endedSignal)
}()
if err := unix.Pipe(b.pipeFDs[:]); err != nil {
return fmt.Errorf("unable to open pipe: %w", err)
}
b.pipeWriteFD.Store(int32(b.pipeFDs[1]))
// WatchDirectory kqueue to the read side of the pipe so we can break the
// loop on shutdown. SetKevent handles the per-arch Ident type
// (uint64 on 64-bit, uint32 on 386/arm).
var pipeEv unix.Kevent_t
unix.SetKevent(&pipeEv, b.pipeFDs[0], unix.EVFILT_READ, unix.EV_ADD|unix.EV_CLEAR)
if _, err := unix.Kevent(kq, []unix.Kevent_t{pipeEv}, nil, nil); err != nil {
return fmt.Errorf("unable to watch pipe: %w", err)
}
b.notifyStarted()
events := make([]unix.Kevent_t, 128)
for {
n, err := unix.Kevent(kq, nil, events, nil)
if err != nil {View on GitHub (pinned to 1bcfa18d79)
When it happens
Trigger: Thrown at internal/fswatch/kqueue.go:164 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of microsoft/typescript-go@1bcfa18d79 (2026-08-16).
Data as JSON: /api/errors/da89784e5e965b93.
Report an issue: GitHub.