Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. #914

Open
mathiasfoster opened this issue Nov 16, 2023 · 5 comments · May be fixed by #1232
Labels
bug Something isn't working

Comments

@mathiasfoster
Copy link

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:

  1. npm install @supabase/supabase-js
  2. node .
  3. Error: DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
  4. npm ls whatwg-url
  5. 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
@mathiasfoster mathiasfoster added the bug Something isn't working label Nov 16, 2023
@bhvngt
Copy link

bhvngt commented 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 my package.json

	"pnpm": {
		"overrides": {
			"whatwg-url": "13.0.0"
		}
	}

@rossirpaulo
Copy link

any updates here?

@jk-sulis
Copy link

I would also appreciate an upgrade :)

@AdamBD
Copy link

AdamBD commented Jun 24, 2024

Any schedule for this? Its an annoying warning in the main javascript SDK.

@m-shaka
Copy link

m-shaka commented Jun 27, 2024

I guess there are two ways to fix this:

  • release new @supabase/node-fetch based on node-fetch v3, which doesn't depend on whatwg-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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants