Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97371

VSCode keeps complaining there is no "process.env"

$
0
0

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?


Viewing all articles
Browse latest Browse all 97371

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>