Closed johrstrom closed 9 months ago
It's not a dependency as I'm pretty sure node-gyp used to be bundled with node.js, we might need to change that
OK weird - I setup a test repository (https://github.com/johrstrom/test_node_gyp) (just to make sure I'm not insane) and see this message - which I don't see in the code base that I'm getting this error out of.
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.
And since it says that - it works because it automatically installed it.
It's probably due to thius https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20
OK - I cannot replicate the issue in a simple demonstrative project. It acknowledges that node-gyp is not there and installs it.
Not really sure why my original project doesn't have the same behavior, but it's clearly an environmental issue.
OH! got it to replicate using version 0.9.0
. Maybe all I have to do is update lol. Sorry for the noise - I thought it would be helpful in case other users see the same.
Feel free to close this as it doesn't even seem to impact 1.0.0
and users on 0.9.0
have a workaround.
IDK if there's anything to be done on your side - but I'm more of a ruby developer so there could be some node.js nuance I'm missing.
Environment details
ubuntu-latest
)Issue description
node-gyp
doesn't appear to be available in Github actions anymore. I'm not quite sure when this changed, but our builds started to fail maybe a week ago with this error below (it was flaky for some time, but now reliably fails).Basically trying to install this package failed because
node-gyp
does not appear to be in the PATH.The fix was just to add a step like so
This issue is half a heads up as others may encounter the same, the other half wondering why it's not a dependency? I would guess there's an assumption that the nodejs you've installed through your system package manager also installed this module?
In any case - feel free to close as it really is just a informational ticket to let folks know should they run into the same issue. (I could setup a simple CI to demonstrate the same and can do so if you like/need).