---
title: "Discussion on \"Resolving nextjs PUBLIC_ENV undefined prod issue\" | Hashnode"
description: "Discussion on \"Resolving nextjs PUBLIC_ENV undefined prod issue\". Context\nBackstory\nThe Issue\nThe solution\nClosing notes\n\nContext\nNext.js allows us to define env vars that we want to expose to the browser (consequently making them public) with the prefix NEXT_PUBLIC_, meaning that they will be bundled into the code..."
url: "https://hashnode.com/posts/resolving-nextjs-publicenv-undefined-prod-issue/675f9b9fdd2f40db6e3385f8"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Resolving nextjs PUBLIC\_ENV undefined prod issue](https://terminal-knight.hashnode.dev/resolving-nextjs-publicenv-undefined-prod-issue?utm_source=hashnode&utm_medium=feed)

Context Backstory The Issue The solution Closing notes Context Next.js allows us to define env vars that we want to expose to the browser (consequently making them public) with the prefix NEXT\_PUBLIC\_, meaning that they will be bundled into the code...

Dec 16, 2024 · 4 min read · terminal-knight.hashnode.dev  
Updated Dec 24, 2024  
Read the article

-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#environment-variables](https://hashnode.com/tag/environment-variables)
-   [#docker](https://hashnode.com/tag/docker)
-   [#azure-devops](https://hashnode.com/tag/azure-devops)

## Written by

[Adrian Nare](https://hashnode.com/@sirA-D)

@sirA-D

  
[View profile](https://hashnode.com/@sirA-D)

you dont know what you don't know btw

📺 Frontend dev ⚛️ Reactjs, Typescript, nextjs, node, TaliwindCss, 📺 I use vim btw

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
