How can I use googleapis into react native?

会有一股神秘感。 提交于 2019-12-24 01:25:35

问题


Currently, I am trying to use google drive API v3 into react native. I am taking as an example from google drive API v3 Node.js. But the problem is when I am trying to import the googleapis into my project it's showing below error.

I googled many times but can't find solutions. Can anybody help me out of this?


回答1:


The Node.JS API for Google Drive makes use of Node's built-in path module. Aside from the developer tools, React Native is not built on top of Node - it makes use of Safari's JavaScript engine, JavaScriptCore. Therefore, when you run your application, the path module doesn't exist, and the API client won't work.

You instead need to make use of the REST API directly to communicate with Google.



来源:https://stackoverflow.com/questions/44327592/how-can-i-use-googleapis-into-react-native

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!