question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WARN: Require cycle: node_modules/@supabase/realtime-js/dist/main/RealtimeSubscription.js

See original GitHub issue

Bug report

Describe the bug

I am getting a warning when using supebase in react native, I have the following configuration

import AsyncStorage from '@react-native-async-storage/async-storage';
import { createClient } from '@supabase/supabase-js'

const supabaseUrl = YOUR_REACT_NATIVE_SUPABASE_URL
const supabaseAnonKey = YOUR_REACT_NATIVE_SUPABASE_ANON_KEY

export const supabase = createClient(supabaseUrl, supabaseAnonKey, {
  localStorage: AsyncStorage as any,
  autoRefreshToken: true,
  persistSession: true,
  detectSessionInUrl: false,
});

When making a query I get the following warning:

Require cycle: node_modules/@supabase/realtime-js/dist/main/RealtimeSubscription.js -> node_modules/@supabase/realtime-js/dist/main/lib/push.js -> node_modules/@supabase/realtime-js/dist/main/RealtimeSubscription.js

To Reproduce

Use the suggest setting to expose the documentation https://supabase.com/docs/guides/with-expo

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

CleanShot 2022-06-18 at 02 33 40@2x

System information

  • OS: [macOS]
  • Version of supabase-js: 1.35.3
  • Version of Node.js: 16

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
kiwicopplecommented, Jun 25, 2022

transferring this one over to the realtime repo 👍

1reaction
engelzerocommented, Sep 14, 2022

Upgrading @supabase/supabase-js to 1.35.6 solves this warning for me.

Both are required.

    "@supabase/realtime-js": "^1.7.4",
    "@supabase/supabase-js": "^1.35.6",
Read more comments on GitHub >

github_iconTop Results From Across the Web

Require cycle: node_modules/core-js/internals/microtask.js ...
Require cycle : node_modules/core-js/internals/microtask.js warning #31969. Open. KrisLau opened this issue on Aug 5, 2021 · 7 comments.
Read more >
Require cycles are allowed, but can result in uninitialized ...
In javascript if you import different modules into other modules all ... from the comp.js This is what triggers the Require cycle warning...
Read more >
Require Cycle Warnings : r/reactnative - Reddit
Howdy peeps. I like using the index.js to export a bunch of components I designed and it keeps giving me Require Cycle Warning...
Read more >
Realm node package has "cycle" warnings - MongoDB
... warning that appears to cause circular references and possible memory leaks. Require cycle: node_modules/realm/lib/browser/util.js ...
Read more >
Initialization error | Database Hub - Back4App
js Require cycles are allowed, but can result in uninitialized values. Consider refactoringto remove the need for a cycle. TypeError: undefined is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found