Nextjs 13 Environmental variable
Hello!
I recently installed Nextjs to try out the "new" app directory, because I heard server actions are cool.
I am using a Dockerfile to deploy, and before I run the build command, I also inject the env variables like this:
ARG tmp
ENV NEXT_PUBLIC_TMP=$tmp
For some reason I can deploy without any problems but when I navigate to the project, I instantly get a message that it cant see the environmental variables.
Has anyone had this problem before?
Solution:Jump to solution
no need for
ENV
just do ARG NEXT_PUBLIC_TMP
assuming the variable next wants is NEXT_PUBLIC_TMP
after all5 Replies
Project ID:
N/A
N/A
Solution
no need for
ENV
just do ARG NEXT_PUBLIC_TMP
assuming the variable next wants is NEXT_PUBLIC_TMP
after allOkay, I am going to give it a try
It works perfectly! Thanks
awesome!