Cannot destructure property 'client_secret' of 'credentials.installed' code example
Example: Cannot destructure property 'client_secret' of 'credentials.installed'
var clientSecret = credentials.installed.client_secret;
In this line credentials is pointing to client_secret.json
so the first key has to be "installed". In my case the key was
"web" and that was causing the error.
I just renamed the key "web" to "installed".