I have a file test/test.ts
which is as simple as one line:
process.env["NODE_ENV"] = 'test';
My VSCode complains that it cannot find 'process':
Cannot find name 'process'. Do you need to install type definitions for node? Try
npm i @types/node
.ts(2580)
However, when I run the Typescript compiler tsc test/test.ts
is happy with the file without any error.
Of cource I have installed @types/node
, but VSCode is still complaining. How can I fix that?