How to fix Google API error "Cannot destructure property 'HTTP2_HEADER_CONTENT_ENCODING'"

Viewed 117

This code, paraphrased straight from Google Store application-specific data:

import
{
    google,   
    drive_v3, 
    Auth,     
    Common,   
} from 'googleapis';
// or even like this: const {google} = require('googleapis');

gives me this error

Uncaught TypeError: Cannot destructure property 'HTTP2_HEADER_CONTENT_ENCODING' of 'http2.constants' as it is undefined.
    at 7h9Wq.buffer (http2.js:25:9)
    at newRequire (index.90c5fab6.js:71:24)
    at localRequire (index.90c5fab6.js:84:35)
    at 467r3.process (apirequest.js:23:12)
    at newRequire (index.90c5fab6.js:71:24)
    at localRequire (index.90c5fab6.js:84:35)
    at i6G3y.google-auth-library (index.js:32:20)
    at newRequire (index.90c5fab6.js:71:24)
    at localRequire (index.90c5fab6.js:84:35)
    at e5pX1.googleapis-common (index.js:17:29)

This helper file will be attached to a button in a Vue.js web app running in the browser, not in Node.js on the server.

How can I fix this please?

0 Answers
Related