Closed vimtor closed 1 year ago
I fixed this error in my project by following the steps outlined in Remix documentation: https://remix.run/docs/en/1.14.1/pages/gotchas#md-importing-esm-packages
Basically, you need to add the following setting to your remix.config.js
file:
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
...
serverDependenciesToBundle: ['@supabase/auth-ui-react']
};
I fixed this error in my project by following the steps outlined in Remix documentation: https://remix.run/docs/en/1.14.1/pages/gotchas#md-importing-esm-packages Basically, you need to add the following setting to your
remix.config.js
file:/** @type {import('@remix-run/dev').AppConfig} */ module.exports = { ... serverDependenciesToBundle: ['@supabase/auth-ui-react'] };
This worked like a charm! Thank you @artykr :)
Super helpful, thanks @artykr!
This is not a bug, this is just esm vs cjs and the fix you've used is the way to go. Not every React metaframework is supporting esm, so cjs still have to be shipped, not sure why Remix isn't picking the correct one when it's being used since we ship both esm and cjs with the libraries.
Bug report
Describe the bug
The React.js version of this package is not compatible with Remix.run
I am not sure if this is a problem with Remix or Supabase but my gut tells me this has to do with Supabase since other packages React.js packages work nice with Remix.
After installing it and doing the simple setup the following error occurs:
To Reproduce
@supabase/supabase-js
,@supabase/auth-ui-react
and@supabase/auth-ui-shared
export default function Login() { return ( <Auth supabaseClient={supabase} appearance={{ theme: ThemeSupa }} />; ); }