google-api-nodejs-client: TypeError: Cannot convert undefined or null to object

All I’m doing is: var {google} = require(‘googleapis’) as the instructions by Google say to do.

I’m getting “Cannot convert undefined or null to object” error.

The error is happening around pify.

Tried to run the example in “Test googleapis in your browser” but it still fails.

Tried to manually add the required and included dependencies without success.

Running the latest node, npm, and googleapis release versions. What am I doing wrong here?

Tried both import {google} from 'googleapis'; and var {google} = require('googleapis')

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

@weisssean I don’t think anyone but you can reproduce your issue with version 27. Just to make sure, are you running this on the server side or on the browser side? I don’t think this library runs on the browser.