Closed s0ckz closed 1 year ago
+1 to this issue, all our CI/CD pipelines failed ysterday with Docker Node 18 LTS (resolving to 18.18) with a similar error and we had to revert to Node 18.17 to make things work again. To be more precise, running on circle image (cimg:node18-lts) and node:18-slim.
info This package requires node-gyp, which is not currently installed. Yarn will attempt to automatically install it. If this fails, you can run "yarn global add node-gyp" to manually install it.
error An unexpected error occurred: "/home/circleci/project/node_modules/web3: Cannot read properties of undefined (reading 'config')".
info If you think this is a bug, please open a bug report with the information provided in "/home/circleci/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "node-gyp@9.4.0" with binaries:
- node-gyp
Exited with code exit status 1
Unclear if it's related to the above, if not let me know and I'll write a more extensive ticket across our CircleCI errors + docker CI/CD pipeline with more logs.
For now pinning both back to 18.17 fixed it.
It might be related to https://github.com/nodejs/node/issues/48444
Probably not because the kernel in buster is too old. Libuv uses io_uring when approx. the kernel >= 5.13.
we run into the same issue with docker and debian:testing images and we also see it with latest node 20
Same here 👍
yarn global add node-gyp && yarn install --frozen-lockfile
This workaround seems to be less flaky, I don't want to pin to a minor version because of security updates
v18.18.0 contains an npm upgrade from v9.7.1 to v9.7.2 (commit 4a6177daad59ec5bb4c29f10822d5a98655efe1a) that removes deps/npm/bin/node-gyp-bin/node-gyp
. It seems highly probable that change is responsible.
Try downgrading npm and, if that resolves the issue, close this bug report and report it over at npm.
~Seems like npm 9.7.2 still has node-gyp, unless I'm missing something: https://github.com/npm/cli/tree/v9.7.2/node_modules/%40npmcli/node-gyp~
Whoops, in bin not the module itself. Yup, confirmed that was absent there.
Explicitly using npm 9.7.1 did resolve the issue for me (I was experiencing a similar issue using npm 9.8.1 myself)
I see you've reported an npm bug so I'll go ahead and close this one. We just need to wait for npm to send the bug fix our way.
everyones actually fucking retarded wheres the answer dumbasses
Version
v18.18.0
Platform
Docker with node:18.18-buster-slim image
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
10/10
What is the expected behavior? Why is that the expected behavior?
It's expected that ffi-napi is installed. It works on 18.17:
What do you see instead?
Additional information
It might be related to https://github.com/nodejs/node/issues/48444