As it happens, I had a persistent variable called, obviously, GOOGLE_API_KEY
set already in my environment to a slightly different value.
I have to admit, this one makes no sense.
I defined an .env file for dotenv
. Inside, I set my GOOGLE_API_KEY to the key. Later:
dotenv.load();
But what I find is that my API key is not equal to process.env.GOOGLE_API_KEY. It is the same length and the first half is correct, but the second half is different.
It’s stuff like this that makes programming frustrating, in truth. Just bizarre stuff.
Any ideas?