Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

Latest commit

 

History

History
19 lines (11 loc) · 876 Bytes

missing-env-value.md

File metadata and controls

19 lines (11 loc) · 876 Bytes

Missing Env Value

Why This Error Occurred

In one of your pages you attempted to access an environment value that is not provided in the environment.

When accessing environment variables on the client they must be prefixed with NEXT_PUBLIC_ to signify they are safe to be inlined for the client.

When accessing environment variables on the server in getStaticProps, getServerSideProps, or an API route the value must be provided in the environment at runtime.

Possible Ways to Fix It

Either remove the code accessing the env value, populate it in your .env file, or manually populate it in your environment before running next dev or next build.

Useful Links