Node 24 compatibility
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- javascript, node.js
调研方向
使用提供的 jsonwebtoken.sign 示例,在 Node 24 上复现 jsonwebtoken 9.0.2 的失败,然后检查嵌套的依赖链 jws > jwa > buffer-equal-constant-time 以及失败的 index.js 行。当在保留 Node 22 上正常行为的同时,签名能够在 Node 24 上成功时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- JavaScript
- 星标
- 18.2k
- 派生
- 1.3k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
auth0/node-jsonwebtoken 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
auth0/node-jsonwebtoken#1042 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
auth0/node-jsonwebtoken#1000 · 2 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 45/100
auth0/node-jsonwebtoken#1048 ·
-
难度 4/5 3-5 天 新手友好度 65/100
auth0/node-jsonwebtoken#1046 ·
-
难度 5/5 一周以上 新手友好度 10/100
auth0/node-jsonwebtoken#1034 ·
查看 auth0/node-jsonwebtoken 的全部 Issue
相似的 Issue
-
Complexity: Small P-Feature: Projects page ready for merge team role: back end/devOps role: front end size: 0.25pt
难度 1/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 67/100
bellingcat/toolkit#905 ·
-
self-care self-care:docs-build-time-investigator
难度 2/5 半天 新手友好度 76/100
githubnext/gh-aw-cao#14191 ·
维护者通常 1 天内回复
-
effort:low impact:medium RAG status: auto-triaged
难度 2/5 1-3 小时 新手友好度 84/100
mastra-ai/mastra#25229 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
sugarlabs/musicblocks#8984 ·
维护者通常 1 天内回复