I am coding a website with Next.js and I tried to add google Tag Manager. I followed the tutorial on the Next.js Github example but for some reasons I can't access to my environment variables. It says my variable is undefined. I created a file .env.local on my project folder (at the same level as components, node_modules, pages, etc) In this file I created a variable like this (test purpose) : NEXT_PUBLIC_DB_HOST=localhost And on my index page I...
Originally asked by Florie Anstett on Stack Exchange (stackoverflow) (CC BY-SA 4.0).