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 · 8 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

@obra
Copy link

obra commented 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
Copy link

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"
		}
	}

A year later this is still the only fix

apolyeti added a commit to waylonwilliams/cafe-hopper-server that referenced this issue Oct 16, 2024
@kevinwright
Copy link

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 native fetch?

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.

9 participants