supabase-js
supabase-js copied to clipboard
DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
Bug report
- [x ] I confirm this is a bug with Supabase, not with my own application.
- [x ] I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
When using Supabase-JS, I get an error about the punycode module being deprecated.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- npm install @supabase/supabase-js
- node .
- Error: DeprecationWarning: The
punycodemodule is deprecated. Please use a userland alternative instead. - npm ls whatwg-url
- Response: @supabase/[email protected] │ └─┬ @supabase/[email protected] │ └── [email protected]
Expected behavior
No deprecation.
System information
- OS: WSL2 on Windows 10
- Version of supabase-js: ^2.38.4
- Version of Node.js: v21.1.0
I got similar error when I upgraded my node version to v21. This is due to older version of whatswg-url used inside @supabase/node-fetch.
One quick workaround till the team upgrades this dependency is to override the version in your package.json. Since I use pnpm as a package manager. I am using following snippet inside my package.json
"pnpm": {
"overrides": {
"whatwg-url": "13.0.0"
}
}
any updates here?
I would also appreciate an upgrade :)
Any schedule for this? Its an annoying warning in the main javascript SDK.
I guess there are two ways to fix this:
- release new
@supabase/node-fetchbased onnode-fetchv3, which doesn't depend onwhatwg-url, and use it from this library - use native fetch instead of
@supabase/node-fetch
In my opinion, the second is better since Node.js v18, the oldest maintained LTS, is supporting fetch.
However, that means the library will stop supporting dead versions of Node.js.
supabase is a business so it may be difficult to do that.
Anyway, I can contribute so please let me know, maintainers
Hi supabase folks - Is there anything that users/customers can do to push this forward? Having a deprecation warning logged in our apps (and even in the happy path of the tutorials) because they're using supabase's first party js libraries feels a little bit like a broken window.
I got similar error when I upgraded my node version to
v21. This is due to older version of whatswg-url used inside @supabase/node-fetch.One quick workaround till the team upgrades this dependency is to override the version in your package.json. Since I use
pnpmas a package manager. I am using following snippet inside mypackage.json"pnpm": { "overrides": { "whatwg-url": "13.0.0" } }
A year later this is still the only fix