Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with React and Browser apps and chrome extensions #2488

Open
jmc420 opened this issue Dec 18, 2020 · 7 comments
Open

Use with React and Browser apps and chrome extensions #2488

jmc420 opened this issue Dec 18, 2020 · 7 comments
Labels
type: docs Improvement to the documentation for an API.

Comments

@jmc420
Copy link

jmc420 commented Dec 18, 2020

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:

#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:

google/google-api-javascript-client#432

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Dec 19, 2020
@JustinBeckwith JustinBeckwith added the type: docs Improvement to the documentation for an API. label Dec 20, 2020
@yoshi-automation yoshi-automation removed the triage me I really want to be triaged. label Dec 20, 2020
@marvinirwin
Copy link

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?

@TadhgOCP
Copy link

Any movement on this?

@radityoardi
Copy link

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?

@albertpratomo
Copy link

+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.

image

@vp5h
Copy link

vp5h commented Dec 8, 2023

@albertpratomo did you find any solutions to this?

@shaineoneal
Copy link

I'm having this issue right now, anyone find anything?

@vp5h
Copy link

vp5h commented Jan 2, 2024

I directly made API requests via fetch to get around this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs Improvement to the documentation for an API.
Projects
None yet
Development

No branches or pull requests

9 participants