Netlify site name: astonishing-chimera-958017
I had an app running fine locally and using ntl deploy live with netlify-cli 12.4.0 and vite 3.2.5. It had a “Projects” link that displayed all projects and this worked locally and live. It used a netlify function which used DOTENV.
Now, Im running with Vite 4.0.0, still netlify-cli 12.4.0 and works locally but “ntl deploy live” would NOT show the list of projects. Rest of site worked. Build worked, only accessing the Netlify functions failed with deploy live.
So I thought it was a Vite change issue. However, wasnt getting expected result so switched back to current Vite (4.0.0) then noticed mongodb had changed so reverted to earlier version. Didnt work.
Next I recalled issued with Vite and DOTENV so I removed dotenv and tested with hardcoded variables, now removed and the live deploy works. I had earlier added the environment variables to the temporary website but that didnt work, perhaps because it wasnt “deployed” and just temporary?
So it looks like I have to switch to the new Vite/Svelte style of handling environment variables and drop dotenv.