简体   繁体   中英

How can I use googleapis into react native?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM