Skip to content

Adding a single relative require() call turns other calls into a crazy game of whack-a-mole in JS project with Node #29865

@DanielRosenwasser

Description

@DanielRosenwasser

wtfnodedts

Steps

mkdir ughrepro
cd ughrepro
mkdir src
code .

Create the file ./src/index.js:

// @ts-check

const net = require("net");
const path = require("path");
const readline = require("readline");
const stream = require("stream");

If at this point nothing seems off (ATA has taken effect and you can jump to definitions on each of those paths), then try reloading the editor or just wait a few seconds.

If you suddenly get errors, try inserting a space into one of the paths. That path will still be invalid but the rest will suddenly work.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions