node-re2 icon indicating copy to clipboard operation
node-re2 copied to clipboard

with snap node on aarch64 it doesnt build

Open ledlamp opened this issue 2 years ago • 4 comments

it seems if you're on aarch64 (oracle free for example) and you use the snap node (cause it's convenient ya know), it installs without error when it actually has no build and then errors with Cannot find module './build/Release/re2'. even with build tools and node-gyp installed it doesnt install the build.

once you install real nodejs (i.e. nodesource) it works fine.

on amd64 it works with snap.

so i think it fails because of snap containerizing or something and there's no node-gyp in there, and the problem is the install script fails silently

ledlamp avatar Feb 05 '23 06:02 ledlamp

No idea how to test this specific case and how to make failing more prominent. Contributions are welcome.

uhop avatar Feb 11 '23 03:02 uhop

I got the same problem. The last version works for me is 1.18.0.

0pt1m1z3r avatar Oct 20 '23 14:10 0pt1m1z3r

this will probably fixed automatically when #193 is released

viceice avatar Feb 23 '24 09:02 viceice

I faced the same issue using old eol node version v14.15.1 if it helps someone. Downgrading to 1.18.0 worked even with old node js version

ildardevico avatar Mar 06 '24 17:03 ildardevico

Not sure if this is the same issue... On eslint-plugin-jsdoc, re2 is part of our tooling chain and failing during install as per https://github.com/gajus/eslint-plugin-jsdoc/actions/runs/9865922189/job/27243770093?pr=1257 (with Node 22 only, not earlier versions)

brettz9 avatar Jul 10 '24 00:07 brettz9

Not sure if this is the same issue...

This is an actionable info. Thank you.

I see some compiler errors in nan.h and include/node/*.h files. The former file comes with the nan dependency, which cannot support newer versions of Node if it had breaking changes. The latter ones come from Node that you use.

TL;DR: I suggest to upgrade to the latest re2 version (1.21.3) and try again. Unfortunately the newer versions of Node require recompiling the C++ code with newer nan.

Please let me know if it worked for you.

uhop avatar Jul 10 '24 02:07 uhop

Thank you... May be a while as I wait on a PR to be merged, but plan to let you know how it goes.

brettz9 avatar Jul 10 '24 12:07 brettz9

With an updated version in use, it is passing now--thanks very much for your help!

brettz9 avatar Jul 10 '24 13:07 brettz9