Skip to content

Conversation

@micksatana
Copy link
Owner

No description provided.

@micksatana
Copy link
Owner Author

This issue seems to cause the broken pipeline for docker-medusa when using the @medusa/cli.

@micksatana
Copy link
Owner Author

There is an attempt to fix the issue in auth0/node-jwa#52

meanwhile the root cause will be revert in nodejs/node#58211

@micksatana
Copy link
Owner Author

Recently, you may face a broken pipeline due to the following error.

#21 1.385 /app/node_modules/buffer-equal-constant-time/index.js:37
#21 1.385 var origSlowBufEqual = SlowBuffer.prototype.equal;
#21 1.385                                   ^
#21 1.386 TypeError: Cannot read properties of undefined (reading 'prototype')
#21 1.386     at Object.<anonymous> (/app/node_modules/buffer-equal-constant-time/index.js:37:35)
#21 1.386     at Module._compile (node:internal/modules/cjs/loader:1734:14)
#21 1.386     at Object..js (node:internal/modules/cjs/loader:1899:10)
#21 1.386     at Module.load (node:internal/modules/cjs/loader:1469:32)
#21 1.386     at Module._load (node:internal/modules/cjs/loader:1286:12)
#21 1.386     at TracingChannel.traceSync (node:diagnostics_channel:322:14)
#21 1.386     at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
#21 1.386     at Module.require (node:internal/modules/cjs/loader:1491:12)
#21 1.386     at require (node:internal/modules/helpers:135:16)
#21 1.386     at Object.<anonymous> (/app/node_modules/jwa/index.js:1:19)
#21 ERROR: process "/bin/sh -c npx medusa build" did not complete successfully: exit code: 1

#18 [linux/arm64 deps 3/3] RUN npm i
#18 CANCELED
------
 > [linux/amd64 builder 4/4] RUN npx medusa build:
1.386     at Object.<anonymous> (/app/node_modules/buffer-equal-constant-time/index.js:37:35)
1.386     at Module._compile (node:internal/modules/cjs/loader:1734:14)
1.386     at Object..js (node:internal/modules/cjs/loader:1899:10)
1.386     at Module.load (node:internal/modules/cjs/loader:1469:32)
1.386     at Module._load (node:internal/modules/cjs/loader:1286:12)
1.386     at TracingChannel.traceSync (node:diagnostics_channel:322:14)
1.386     at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
1.386     at Module.require (node:internal/modules/cjs/loader:1491:12)
1.386     at require (node:internal/modules/helpers:135:16)
1.386     at Object.<anonymous> (/app/node_modules/jwa/index.js:1:19)

The root cause seems to be related to SlowBuffer EOL which hopefully will be reverted.

For the permanent fix, the jsonwebtoken lib need to be updated with new jws and jwa version that has removed the use of deprecated buffer-equal-constant-time.

@micksatana
Copy link
Owner Author

Note: SlowBuffer reverted in Node 24.0.1

@micksatana micksatana merged commit 8e3a643 into main May 8, 2025
6 of 12 checks passed
@micksatana micksatana deleted the fix/support-node-24 branch May 8, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants