I am realising example from Google Calendar API instruction web page. I put the code into example.js file and start it with node example.js in command line.
<
I had the same issue. I had a version of the google-auth-library that wasn't compatible with the most recent googleapis version. Check your versions - you might need to upgrade and migrate over your google-auth-library which is why the example above doesnt work for you.
Here's the edits you might have to do if this is your issue: https://github.com/google/google-auth-library-nodejs/releases/tag/v1.0.0