install error

Hello. When I write pnpm install --frozen-lockfile (contributing) I get error
│ LIBTOOL-STATIC Release/zlib.a
│ CXX(target) Release/obj.target/zlib_sync/src/zlib_sync.o
│ ../src/zlib_sync.cc:1:10: fatal error: 'algorithm' file not found
│ 1 | #include <algorithm>
│ | ^~~~~~~~~~~
│ 1 error generated.
│ make: *** [Release/obj.target/zlib_sync/src/zlib_sync.o] Error 1
│ gyp ERR! build error
│ gyp ERR! stack Error: `make` failed with exit code: 2
│ gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/build.js:216:23)
│ gyp ERR! System Darwin 24.3.0
│ gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
│ gyp ERR! cwd ~/Documents/GitHub/discord.js/node_modules/.pnpm/[email protected]/node_modules/zlib-sync
│ gyp ERR! node -v v22.14.0
│ gyp ERR! node-gyp -v v10.2.0
│ gyp ERR! not ok
│ LIBTOOL-STATIC Release/zlib.a
│ CXX(target) Release/obj.target/zlib_sync/src/zlib_sync.o
│ ../src/zlib_sync.cc:1:10: fatal error: 'algorithm' file not found
│ 1 | #include <algorithm>
│ | ^~~~~~~~~~~
│ 1 error generated.
│ make: *** [Release/obj.target/zlib_sync/src/zlib_sync.o] Error 1
│ gyp ERR! build error
│ gyp ERR! stack Error: `make` failed with exit code: 2
│ gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/build.js:216:23)
│ gyp ERR! System Darwin 24.3.0
│ gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
│ gyp ERR! cwd ~/Documents/GitHub/discord.js/node_modules/.pnpm/[email protected]/node_modules/zlib-sync
│ gyp ERR! node -v v22.14.0
│ gyp ERR! node-gyp -v v10.2.0
│ gyp ERR! not ok
How to solve this error? Branch is main, pnpm 9.15.5
2 Replies
d.js toolkit
d.js toolkit3d ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
Булочка | pasha_boez
Tried other versions of node, npm and pnpm Contribute Fork With no changes on it Ok, thanks

Did you find this page helpful?