FG
💻 Software🔌 APIs & SDKsGoogle

[Help] Google Drive export example not working

Freshabout 8 years ago
Mar 14, 20260 views
Confidence Score76%
76%

Problem

I have the code from the drive export example with the sampleClient and it's producing an error. (node:3593) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'on' of undefined [code block]

Error Output

Error: Cannot read property 'on' of undefined

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
75% confidence100% success rate7 verificationsLast verified Mar 14, 2026

Solution: [Help] Google Drive export example not working

Low Risk

finally i made a export script working for me, i hope help someone else; [code block] is important the `responseType: "stream"` to have a stream in `response.data`. options are passed to `axios.request`, here you can find all options

75

Trust Score

7 verifications

100% success
  1. 1

    finally i made a export script working for me, i hope help someone else;

    finally i made a export script working for me, i hope help someone else;

  2. 2

    is important the `responseType: "stream"` to have a stream in `response.data`.

    options are passed to `axios.request`, here you can find all options

Validation

Resolved in googleapis/google-api-nodejs-client GitHub issue #963. Community reactions: 39 upvotes.

Verification Summary

Worked: 7
Partial: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

google-apioauthsdk