google-api-nodejs-client
google-api-nodejs-client copied to clipboard
Use with React and Browser apps and chrome extensions
Please could it make clear in the documentation whether this api can be used with React in a Browser in a standard webapp or Chrome extensions?
There is this bug report which appears to indicate that it can be used:
https://github.com/googleapis/google-api-nodejs-client/issues/1614
There is the alternative google-api-javascript-client library but it is not published in the npm registry and it doesn't look that it is possible to do this:
https://github.com/google/google-api-javascript-client/issues/432
When trying to build google-api-nodejs-client/src/apis/calendar
this webpack error came up.
[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
configuration.node should be one of these:
false | object { __dirname?, __filename?, global? }
-> Include polyfills or mocks for various node stuff.
Details:
* configuration.node has an unknown property 'child_process'. These properties are valid: object { __dirname?, __filename?, global? }
-> Options object for node compatibility features. * configuration.node has an unknown property 'fs'. These properties are valid:
object { __dirname?, __filename?, global? } -> Options object for node compatibility features.
* configuration.node has an unknown property 'crypto'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'http2'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
Automatic NodeJs polyfills were removed in webpack 5
https://webpack.js.org/blog/2020-10-10-webpack-5-release/#automatic-nodejs-polyfills-removed
It's possible to manually add a polyfill for a Node.js core module. An error message will give a hint on how to achieve that.
Perhaps the solution is to provide the nodejs polyfills manually now?
Any movement on this?
I'm facing this issue too, some say this library is only used for nodejs (server), but it's just pointless since we all live in the web era. Any progress?
+1 for this issue too. Is this library meant to be used in browser environment too?
I'm getting this error when trying to import {calendar} from '@googleapis/calendar'
in a Vue component.
@albertpratomo did you find any solutions to this?
I'm having this issue right now, anyone find anything?
I directly made API requests via fetch to get around this.