Expected Behavior
see https://developers.google.com/drive/api/v3/quickstart/nodejs#step_4_run_the_sample
Actual Behavior
(node:36003) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property data of 'undefined' or 'null'. in quickstart.js line 75.
Steps to Reproduce the Problem
- follow https://developers.google.com/drive/api/v3/quickstart/nodejs => failure
- change line 75 from
}, (err, {data}) => { to: }, (err, response) => { and line 77 from const files = data.files; to const files = response.data.files; => success
Specifications
- Node version (
node -v) v8.11.3 (LTS)
- OS (Mac)
Expected Behavior
see https://developers.google.com/drive/api/v3/quickstart/nodejs#step_4_run_the_sample
Actual Behavior
(node:36003) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property
dataof 'undefined' or 'null'. in quickstart.js line 75.Steps to Reproduce the Problem
}, (err, {data}) => {to:}, (err, response) => {and line 77 fromconst files = data.files;toconst files = response.data.files;=> successSpecifications
node -v) v8.11.3 (LTS)