I am going to use both the client and server side google map api key and I added NEXT_PUBLIC to env of google map api key.
It causes error sometimes when I call that env at the server side and error message like this.
“Error: Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported.”
So can’t we use NEXT_PUBLIC env on the server side at the next.js app router?
New contributor
web developer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.