{"record":{"id":"da89784e5e965b93","repo":"microsoft/typescript-go","slug":"unable-to-open-pipe-w-da8978","errorCode":null,"errorMessage":"unable to open pipe: %w","messagePattern":"unable to open pipe: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/fswatch/kqueue.go","lineNumber":164,"sourceCode":"\tb.pipeWriteFD.Store(-1)\n\tb.watcherBase.init(b)\n\treturn b\n}\n\nfunc (b *kqueueBackend) start() error {\n\tkq, err := unix.Kqueue()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to open kqueue: %w\", err)\n\t}\n\tb.kq = kq\n\tdefer func() {\n\t\tb.closeSubscriptions()\n\t\tb.closeFDs()\n\t\tclose(b.endedSignal)\n\t}()\n\n\tif err := unix.Pipe(b.pipeFDs[:]); err != nil {\n\t\treturn fmt.Errorf(\"unable to open pipe: %w\", err)\n\t}\n\tb.pipeWriteFD.Store(int32(b.pipeFDs[1]))\n\n\t// WatchDirectory kqueue to the read side of the pipe so we can break the\n\t// loop on shutdown. SetKevent handles the per-arch Ident type\n\t// (uint64 on 64-bit, uint32 on 386/arm).\n\tvar pipeEv unix.Kevent_t\n\tunix.SetKevent(&pipeEv, b.pipeFDs[0], unix.EVFILT_READ, unix.EV_ADD|unix.EV_CLEAR)\n\tif _, err := unix.Kevent(kq, []unix.Kevent_t{pipeEv}, nil, nil); err != nil {\n\t\treturn fmt.Errorf(\"unable to watch pipe: %w\", err)\n\t}\n\n\tb.notifyStarted()\n\n\tevents := make([]unix.Kevent_t, 128)\n\tfor {\n\t\tn, err := unix.Kevent(kq, nil, events, nil)\n\t\tif err != nil {","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/microsoft/typescript-go/blob/1bcfa18d79a3be41772223d5c05dfe4480e614ff/internal/fswatch/kqueue.go#L146-L182","documentation":"Error \"unable to open pipe: %w\" thrown in microsoft/typescript-go.","triggerScenarios":"Thrown at internal/fswatch/kqueue.go:164 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1bcfa18d79a3be41772223d5c05dfe4480e614ff","analyzedAt":"2026-08-16T02:12:00.115Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}