title: Getting undefined for my environment variables
body: <p>I have angular 12 + node 14 project. Can someone please help me? I have gone through all the posts related to this. I get undefined everytime I try to use environment variable.</p>
  <p>I've placed <code>.env</code> file in the folder where I have my login.component.ts as in my root folder I don't have any ts file from where I could add <code>require('dotenv').config()</code>.</p>
  <p>In my login.component.ts I added:</p>
  <pre><code>require('dotenv').config({path: 'C:/Users/.../git/../src/app/authentication/login/.env'});
  </code></pre>
  <p>My <code>.env</code> file as content like this <code>CLIENT_ID=sample</code>.</p>
  <p>I have below in my <code>package.json</code></p>
  <pre><code>&quot;dotenv&quot;: &quot;^10.0.0&quot;,
  &quot;os-browserify&quot;: &quot;^0.3.0&quot;,
  &quot;path-browserify&quot;: &quot;^1.0.1&quot;,
  &quot;process&quot;: &quot;^0.11.10&quot;,
  &quot;webpack&quot;: &quot;^5.60.0&quot;,
  &quot;dotenv-webpack&quot;: &quot;^7.0.3&quot;
  </code></pre>
  <p>I added all for which I was getting errors. I am trying to build and run using <code>ng build</code> and <code>ng serve</code>.</p>
  <p>Whenever I try this in my <code>login.component.ts</code> I get: <code>undefined</code> on:</p>
  <pre><code>console.log('value is ', process.env.CLIENT_ID);
  </code></pre>