WARN: Require cycle: node_modules/@supabase/realtime-js/dist/main/RealtimeSubscription.js
See original GitHub issueBug 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

System information
- OS: [macOS]
- Version of supabase-js: 1.35.3
- Version of Node.js: 16
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
transferring this one over to the realtime repo 👍
Upgrading
@supabase/supabase-js
to1.35.6
solves this warning for me.Both are required.