Vili Volcini
Vili Volcini

Reputation: 336

Why does visual studio code add import statements that break my nodejs program?

I am developing backend on nodejs.

And I am experiencing weird annoying problem that is luring me for weeks:

Visual Studio Code adds import lines such as:

import { request } from 'http';

They appear randomly on startup, in beggining of my scripts and when they do, it produces compile errors on build. Something about 'module not found'..., but when I delete those lines, I can build without problem.

Anyone has any clue how to stop this behavior?

Upvotes: 1

Views: 478

Answers (1)

Tisamu
Tisamu

Reputation: 154

Search for "import" in the VS Code settings, this may be what your are looking for.

Upvotes: 1

Related Questions