- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 407
Open
Labels
bugSomething isn't workingSomething isn't workingdependenciesPull requests that update a dependency filePull requests that update a dependency fileplanned
Description
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
punycode
module is deprecated. Please use a userland alternative instead. - npm ls whatwg-url
- Response: @supabase/supabase-js@2.38.4
│ └─┬ @supabase/node-fetch@2.6.14
│ └── whatwg-url@5.0.0
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
vincentreitz, DuckCoder1101, devpratico, OlegKipchatov, szhu and 18 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdependenciesPull requests that update a dependency filePull requests that update a dependency fileplanned
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
bhvngt commentedon Nov 19, 2023
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 mypackage.json
rossirpaulo commentedon Dec 20, 2023
any updates here?
jk-sulis commentedon May 10, 2024
I would also appreciate an upgrade :)
AdamBD commentedon Jun 24, 2024
Any schedule for this? Its an annoying warning in the main javascript SDK.
m-shaka commentedon Jun 27, 2024
I guess there are two ways to fix this:
@supabase/node-fetch
based onnode-fetch
v3, which doesn't depend onwhatwg-url
, and use it from this library@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
obra commentedon Sep 5, 2024
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.
expertzz commentedon Sep 20, 2024
A year later this is still the only fix
fix: override punycode deprecation warning, see supabase/node-fetch#5 …
kevinwright commentedon Oct 29, 2024
Why does this continue to be an issue after all this time when it's so trivially fixed by upgrading the
whatwg-url
dependency or just using nativefetch
?AlbinoGeek commentedon Jan 6, 2025
Would be nice if Supabase would handle this upgrade...
Unless you specifically run your project on the old ass "Maintenance" version (20) you are still plagued with this, making every build log unreadable in larger projects.
punycode
removed.)AlbinoGeek commentedon Jan 6, 2025
For those of us using anything other than
pnpm
the "solution" until Supabase gets on this is as follows:package.json
You must place the version override in "resolutions" to enforce it is used across the project. "overrides" only works for direct dependencies, not those of your children's children.
console errors fix
swcho commentedon Mar 15, 2025
For
npm
, I tried next and at least warning message disappeared.But I'm not sure it is practically working ok with
@supabase/node-fetch
.mandarini commentedon Jul 24, 2025
Hi all! Thank you very much for chiming in and contributing to Supabase!
Once we officially drop support for Node 18, in October, then I will be merging this PR, or some version of it, removing the
@supabase/node-fetch
dependency and saving everyone from this warning.I know that some of you may see a solution here, but that would require Node >= 18. As our new Support Policy, is, well, new, I don't want anyone using Node <18 (for whatever reason they may have to use such an old version) to run into any issues. This has indeed created some debt, but all debt will be resolved starting November 1st, I promise. Please bear with me.
That being said, you can use this workaround for now, until we officially get rid of
node-fetch
. I could add some code to suppress that warning, but I want to take the proper way forward. I hope this makes sense.Again, thank you very much for your patience and for contributing to Supabase!