Node 24 compatibility
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript, node.js
- Domain
- authentication, backend
Research direction
Reproduce the failure with jsonwebtoken 9.0.2 on Node 24 using the provided jsonwebtoken.sign example, then inspect the nested jws > jwa > buffer-equal-constant-time dependency chain and the failing index.js line. Done means signing succeeds on Node 24 while preserving the working behavior on Node 22.
Written by the indexing model from the issue text.
Description
Description
jsonwebtoken doesn't work with Node 24. The buffer-equal-constant-time library throws an error:
Cannot read properties of undefined (reading 'prototype')
at
var origSlowBufEqual = SlowBuffer.prototype.equal;
buffer-equal-constant-time is a nested dep: jsonwebtoken > jws > jwa > buffer-equal-constant-time
Reproduction
Initialize a new Node project and install jsonwebtoken.
Run the following JS using Node 24.0.0
import jsonwebtoken from "jsonwebtoken";
jsonwebtoken.sign({ text: "test" }, "ABC");
Result:
var origSlowBufEqual = SlowBuffer.prototype.equal;
^
TypeError: Cannot read properties of undefined (reading 'prototype')
at Object.<anonymous> (/Users/user/testnode24/node_modules/buffer-equal-constant-time/index.js:37:35)
at Module._compile (node:internal/modules/cjs/loader:1734:14)
at Object..js (node:internal/modules/cjs/loader:1899:10)
at Module.load (node:internal/modules/cjs/loader:1469:32)
at Module._load (node:internal/modules/cjs/loader:1286:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Module.require (node:internal/modules/cjs/loader:1491:12)
at require (node:internal/modules/helpers:135:16)
at Object.<anonymous> (/Users/user/testnode24/node_modules/jwa/index.js:1:19)
Node.js v24.0.0
Environment
- jsonwebtoken 9.0.2
- Node 24.0.0
- MacOS Sequoia
Running in Node 22 works without any issues.
- Dominant language
- JavaScript
- Stars
- 18.2k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from auth0/node-jsonwebtoken
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
auth0/node-jsonwebtoken#1042 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
auth0/node-jsonwebtoken#1000 · 2 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 65/100
auth0/node-jsonwebtoken#1046 ·
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
auth0/node-jsonwebtoken#1034 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
auth0/node-jsonwebtoken#1032 ·
All issues in auth0/node-jsonwebtoken
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mksglu/context-mode#1200 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
neondatabase/website#5944 ·
-
module: core
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
bigbluebutton/bigbluebutton#25849 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
jaegertracing/jaeger-ui#4506 ·