nodenext alternates between finding and not finding the imported package 路 Issue #46396 路 microsoft/TypeScript (original) (raw)

Bug Report

馃攷 Search Terms

馃晽 Version & Regression Information

4.5.0-dev.20211016

馃捇 Code

It needs a monorepo setup to reproduce. I made a small repository: https://github.com/ilogico/ts-nodenext-bug

This happens all the time when editing a file, but it's hard to reproduce in a deterministic way.

I reproduce it here by toggling line comments back and forth:
bug

馃檨 Actual behavior

The language service says it cannot find the module or it's corresponding type declarations after having correctly resolved the module.

馃檪 Expected behavior

The module stays resolved.