# Netlify environment variables not used during build process

**URL:** <https://answers.netlify.com/t/netlify-environment-variables-not-used-during-build-process/80249>\
**Category:** Support\
**Tags:** building\
**Created:** [November 30, 2022, 12:06am UTC](https://answers.netlify.com/t/netlify-environment-variables-not-used-during-build-process/80249 "2022-11-30T00:06:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bondgurus](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/bondgurus/32/23695_2.png) [@bondgurus](https://answers.netlify.com/u/bondgurus)\
**Post date:** [November 30, 2022, 12:06am UTC](https://answers.netlify.com/t/netlify-environment-variables-not-used-during-build-process/80249/1 "2022-11-30T00:06:03Z")

</div>

I have a react app and set a netlify variable (REACT\_APP\_ENV). When I deploy via a git push, the variable isn’t set in the program. The results of

console.log(process.env.REACT\_APP\_ENV) yields undefined.

This project doesn’t use create\_react\_app. Is there something extra I need to do to get webpack to use these variables?

Thank you!

---

<div class="post-metadata">

**Author:** ![bondgurus](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/bondgurus/32/23695_2.png) [@bondgurus](https://answers.netlify.com/u/bondgurus)\
**Post date:** [November 30, 2022, 6:57pm UTC](https://answers.netlify.com/t/netlify-environment-variables-not-used-during-build-process/80249/2 "2022-11-30T18:57:37Z")

</div>

found the solution from this page:

> <https://stackoverflow.com/questions/48453493/set-environment-variable-for-build-in-netlify/50656750#50656750>

updated dotenv to include systemvars key:

```auto
 plugins: [
    new Dotenv({
        systemvars: true
    })
  ]

```

---

<div class="post-metadata">

**Author:** ![hillary](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hillary/32/21132_2.png) [@hillary](https://answers.netlify.com/u/hillary)\
**Post date:** [December 1, 2022, 2:24pm UTC](https://answers.netlify.com/t/netlify-environment-variables-not-used-during-build-process/80249/3 "2022-12-01T14:24:44Z")

</div>

Thanks so much for coming back and letting us know!! This will help future forums members who find themselves in the same position.

---

<div class="post-metadata">

**Author:** ![martan](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/martan/32/43708_2.png) [@martan](https://answers.netlify.com/u/martan)\
**Post date:** [December 8, 2022, 5:42pm UTC](https://answers.netlify.com/t/netlify-environment-variables-not-used-during-build-process/80249/5 "2022-12-08T17:42:44Z")

</div>

(post deleted by author)
