【问题标题】:TypeError: undefined is not an object (evaluating 'window.location.href')TypeError:未定义不是对象(评估“window.location.href”)
【发布时间】:2021-12-17 06:30:16
【问题描述】:

我一直在使用 supabase 和 expo 创建一个应用程序,并且在它正常工作之前...... 但现在它不断收到此错误...

TypeError: undefined is not an object (evalating 'window.location.href')

在 node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException

在node_modules/react-native/Libraries/Core/ExceptionsManager.js:172:19 in handleException

在node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError

在 node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError

在 node_modules/metro-runtime/src/polyfills/require.js:204:6 in guardedLoadModule

http://192.168.100.31:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&minify=false:122163:3 在全局代码中

我的 database.js 代码是:

从“@supabase/supabase-js”导入 { createClient }

const supabaseUrl = process.env.SUPABASE_APIURL

const supabaseKey = process.env.SUPABASE_KEY

导出默认 supabase = createClient(supabaseUrl, supabaseKey)

【问题讨论】:

    标签: react-native expo supabase


    【解决方案1】:

    我遇到了同样的错误,并在他们的 gh repo 上为它创建了一个问题。一旦他们合并并释放它,它应该被修复。 https://github.com/supabase/supabase/issues/3790

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-12-01
      • 2019-11-16
      • 2020-02-09
      • 2019-12-07
      • 2022-01-01
      • 2019-01-20
      • 2014-06-13
      • 2021-07-24
      相关资源
      最近更新 更多