Skip to content

Cannot find name 'require' and 'module' when @ts-check is on #21933

@DanielRosenwasser

Description

@DanielRosenwasser

We spoke about this with @mjbvz a few months ago.

When tossing checkJs or // @ts-check into a project, users almost immediately get feedback like Cannot find name 'require' which is frustrating because we specifically understand how require works.

I understand that we want users to have more actionable feedback when they require a Node built-in, but the current behavior is not ideal.

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