nodegit: Can't be installed for Node v16
It seems like nodegit
can’t be installed for Node v16? Can anyone confirm if they can?
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 27
- Comments: 44 (5 by maintainers)
Commits related to this issue
- ci(node-version): dropped testing in node v16 for now until https://github.com/nodegit/nodegit/issues/1840 is resolved — committed to form8ion/javascript-scaffolder by travi 3 years ago
- fix: nodegit issue & install svg-term to record terminal > https://github.com/nodegit/nodegit/issues/1840 — committed to Marvin9/dependency-graph-api by Marvin9 3 years ago
- pin notegid version workaround for https://github.com/nodegit/nodegit/issues/1840 — committed to hpi-swa-lab/squeak-tracedebugger by LinqLover 2 years ago
I too am having an issue installing
nodegit
on Nodev16.3.0
on Mac OS Big Sur. It seems to install fine on Windows 10 though.We’re working on resolving some lingering context awareness issues. Once those are addressed, we’ll cut another alpha release. Once that’s been out without issue for a while, we’d like to cut a non-alpha release including these changes.
Could we have prebuilds for node 18? It is now LTS. Node 16 will be EOL in less than a year, whereas node 18 will be supported through 2025, so I would really like to use node 18, but installing from source can be a pain (and slow).
@ianhattendorf any updates on if the current alpha release has met expectations? Conservative ETA for a 0.28.0 drop?
I have since upgraded to Node v18 and installed
nodegit v0.28.0-alpha.18
, and it installed and runs fine. I know that’s not a solution for everyone, but it might help someone.I wish nodegit wouldn’t need native builds. Or at least not built with node-gyp. node-gyp has been a pain in the – you know, the place, where the sun doesn’t shine. It’s been problematic ever since its beginnings. It’s complicated and the error messages and traces have never been any good. When using NPM, it’s a nightmare and with yarn it’s even worse.
Alternatively, you might want to think about an option to allow simple spawned calls to the git-cli.
I don’t mind a few split seconds or maybe even seconds more, it would take nodegit to execute when running synchronously.
That’s still more efficient than spending half a day chasing these pesky node-gyp compile errors.
I can install in a node 16 docker container, I can not on my Mac Mojave 10.14.6
For me, it seems the issue is the bin is building from source with Node Gyp and the issue is in here, though I don’t fully understand what leads to this (on mac).
NVM could potentially have a part to play in the issue.
It looks like pre-built binaries are missing that could potentially help here:
We’ll get this addressed in 0.28.0.
This isn’t really relevant to this issue, but it might be worth considering targeting WASM instead of publishing native bindings, that way you can have all of the same functions and possibly reduce some if not all of these sorts of issues.
@ianhattendorf
Thanks for your work on nodegit. It would be awesome to have the binaries for Node 16. I’ve spent 3 days reworking our whole infra to move to Node 16 on the latest alpha, and I had to rewrite many parts of our pipeline to prevent timeouts since it currently requires building from source.
Happy to help on this if needed 🙂
Any word on when the next release will be cut?
I think it’s stable enough. The only breaking change seems to be Cred being renamed to Credential (possibly some other minor api changes?).
I’ve been using the alpha versions for a while and have not experienced any problems.
Sorry, I don’t know if they make any guarantees of their release being production ready.
Figma is apparently (unofficially, for their own use, I assume) offering pre-built binaries that work with Node.js v18 on their fork: https://www.npmjs.com/package/@figma/nodegit
Credit goes to Figma an @jfirebaugh (and the people at Figma) whose branch is the base for their current release. Thank you!
nodegit@v0.28.0-alpha.18
works for me on Mac M1 Pro with nodev18.11.0
this does not work properly for me 😦
just in case anyone in need stumbles upon this, the current solution is:
or
but you have to compile it on linux and that could be a problem in a container image lacking required dependencies so add
to your build before installing nodegit
Still in the works, we haven’t noticed any major issues so far with the latest alpha.
I’ll see what we can do about getting prebuilts out soon for Node 16.
try
apt-get install -y python2 python3 libkrb5-dev gcc openssl libssh2-1-dev g++ make
and thennpm install nodegit
It worked for me. The headers downloading process is skipped.Example
docker-compose.yaml
entrypoint
It looks like 0.28.0-alpha.10 is missing a prebuilt linux x64 binary for Node 16.
https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.28.0-alpha.10-node-v93-linux-x64.tar.gz is a 404.
@KyleTryon Seeing the same error with node v16.4.0, macOS 11.6, node-pre-gyp v0.13.0, node-gyp v4.0.0. You can see my full log here. The interesting bit however is
A little bit of googling confirmed that this is in fact a compatibility issue with node v16, and other packages have hit this same error: https://stackoverflow.com/questions/67241196/error-no-template-named-remove-cv-t-in-namespace-std-did-you-mean-remove