Kubessandra / react-google-calendar-api

An api to manage your google calendar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReferenceError: Can't find variable: document

mmubasher opened this issue · comments

I am using react-google-calendar-api@2.0.3 and getting error ReferenceError: Can't find variable: document on iPhone 8 simulator. However, it works fine on web browser using npm run web to execute expo start --web command on my system

Error

ReferenceError: Can't find variable: document

This error is located at:
    in GoogleApiProvider (created by App)
    in App (created by ExpoRoot)
    in ExpoRoot
    in RCTView (created by View)
    in View (created by AppContainer)
    in DevAppContainer (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in main(RootComponent)
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:95:4 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:141:19 in handleException
at node_modules/react-native/Libraries/Core/ReactFiberErrorDialog.js:52:4 in showErrorDialog
at node_modules/react-native/Libraries/ReactNative/renderApplication.js:76:4 in renderApplication
at node_modules/react-native/Libraries/ReactNative/AppRegistry.js:119:25 in runnables.appKey.run
at node_modules/react-native/Libraries/ReactNative/AppRegistry.js:213:4 in runApplication

Environment Information


npm -v
6.4.1
node -v
v12.22.12
"dependencies": {
    "expo": "~45.0.0",
    "expo-status-bar": "~1.3.0",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-gapi": "^1.0.2",
    "react-google-calendar-api": "^2.0.3",
    "react-native": "0.68.2",
    "react-native-web": "0.17.7"
 }

The library is not compatible on React Native

@Kubessandra thanks for getting back on this. Any suggestions on how to proceed for Native?
I am closing this issue since it is not related to this repo.

@Kubessandra thanks for getting back on this. Any suggestions on how to proceed for Native?
I am closing this issue since it is not related to this repo.

You will need to manage all the OAuth part with expo or in React Native, and after that use the API of Google calendar.

Thanks for your valuable feedback. I was also of the similar view on this