uhop / node-re2

node.js bindings for RE2: fast, safe alternative to backtracking regular expression engines.
Other
479 stars 53 forks source link

Error compiling on Node.js #192

Closed nzakas closed 9 months ago

nzakas commented 9 months ago

Today, it seems that node-re2 is failing when used with Node.js v20.8.1. This is happening in our CI system. It looks like node-re2 compilation is erroring out.

Is this a known issue? Are there any workarounds?

Error Log ``` npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'eslint.org@1.0.0', npm WARN EBADENGINE required: { node: '16.14.0' }, npm WARN EBADENGINE current: { node: 'v20.8.1', npm: '10.1.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@es-joy/jsdoccomment@0.31.0', npm WARN EBADENGINE required: { node: '^14 || ^16 || ^17 || ^18' }, npm WARN EBADENGINE current: { node: 'v20.8.1', npm: '10.1.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'eslint-plugin-jsdoc@39.3.3', npm WARN EBADENGINE required: { node: '^14 || ^16 || ^17 || ^18' }, npm WARN EBADENGINE current: { node: 'v20.8.1', npm: '10.1.0' } npm WARN EBADENGINE } npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated @codemirror/matchbrackets@0.19.4: As of 0.20.0, this package has been merged into @codemirror/language npm WARN deprecated @codemirror/comment@0.19.1: As of 0.20.0, this package has been merged into @codemirror/commands npm WARN deprecated @codemirror/rectangular-selection@0.19.2: As of 0.20.0, this package has been merged into @codemirror/view npm WARN deprecated @codemirror/panel@0.19.1: As of 0.20.0, this package has been merged into @codemirror/view npm WARN deprecated @codemirror/history@0.19.2: As of 0.20.0, this package has been merged into @codemirror/commands npm WARN deprecated @codemirror/fold@0.19.4: As of 0.20.0, this package has been merged into @codemirror/language npm WARN deprecated @codemirror/closebrackets@0.19.2: As of 0.20.0, this package has been merged into @codemirror/autocomplete npm WARN deprecated @codemirror/rangeset@0.19.9: As of 0.20.0, this package has been merged into @codemirror/state npm WARN deprecated @codemirror/gutter@0.19.9: As of 0.20.0, this package has been merged into @codemirror/view npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated @codemirror/tooltip@0.19.16: As of 0.20.0, this package has been merged into @codemirror/view npm WARN deprecated @codemirror/highlight@0.19.7: As of 0.20.0, this package has been split between @lezer/highlight and @codemirror/language npm WARN deprecated @codemirror/text@0.19.6: As of 0.20.0, this package has been merged into @codemirror/state npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address' npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi' npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. npm ERR! code 1 npm ERR! path /home/runner/work/eslint.org/eslint.org/node_modules/re2 npm ERR! command failed npm ERR! command sh -c install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR --skip-path-var RE2_DOWNLOAD_SKIP_PATH --skip-ver-var RE2_DOWNLOAD_SKIP_VER || npm run rebuild npm ERR! Trying https://github.com/uhop/node-re2/releases/download/1.17.2/linux-x64-115.br ... npm ERR! Trying https://github.com/uhop/node-re2/releases/download/1.17.2/linux-x64-115.gz ... npm ERR! Building locally ... npm ERR! npm ERR! > re2@1.17.2 rebuild npm ERR! > node-gyp rebuild npm ERR! npm ERR! make: Entering directory '/home/runner/work/eslint.org/eslint.org/node_modules/re2/build' npm ERR! CXX(target) Release/obj.target/re2/lib/addon.o npm ERR! make: Leaving directory '/home/runner/work/eslint.org/eslint.org/node_modules/re2/build' npm ERR! npm ERR! > re2@1.17.2 rebuild npm ERR! > node-gyp rebuild npm ERR! npm ERR! make: Entering directory '/home/runner/work/eslint.org/eslint.org/node_modules/re2/build' npm ERR! CXX(target) Release/obj.target/re2/lib/addon.o npm ERR! make: Leaving directory '/home/runner/work/eslint.org/eslint.org/node_modules/re2/build' npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@8.4.1 npm ERR! gyp info using node@20.8.1 | linux | x64 npm ERR! gyp info find Python using Python version 3.10.12 found at "/usr/bin/python3" npm ERR! gyp http GET https://nodejs.org/download/release/v20.8.1/node-v20.8.1-headers.tar.gz npm ERR! gyp http 200 https://nodejs.org/download/release/v20.8.1/node-v20.8.1-headers.tar.gz npm ERR! gyp http GET https://nodejs.org/download/release/v20.8.1/SHASUMS256.txt npm ERR! gyp http 200 https://nodejs.org/download/release/v20.8.1/SHASUMS256.txt npm ERR! gyp info spawn /usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/home/runner/work/eslint.org/eslint.org/node_modules/re2/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/runner/work/eslint.org/eslint.org/node_modules/re2/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/runner/work/eslint.org/eslint.org/node_modules/re2/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/runner/.cache/node-gyp/20.8.1/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/home/runner/.cache/node-gyp/20.8.1', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/runner/work/eslint.org/eslint.org/node_modules/re2/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/home/runner/.cache/node-gyp/20.8.1/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/runner/work/eslint.org/eslint.org/node_modules/re2', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! In file included from ../../nan/nan.h:178, npm ERR! from ../lib/./wrapped_re2.h:4, npm ERR! from ../lib/addon.cc:1: npm ERR! ../../nan/nan_callbacks.h:55:23: error: ‘AccessorSignature’ is not a member of ‘v8’ npm ERR! 55 | typedef v8::Local Sig; npm ERR! | ^~~~~~~~~~~~~~~~~ npm ERR! ../../nan/nan_callbacks.h:55:40: error: template argument 1 is invalid npm ERR! 55 | typedef v8::Local Sig; npm ERR! | ^ npm ERR! In file included from ../lib/./wrapped_re2.h:4, npm ERR! from ../lib/addon.cc:1: npm ERR! ../../nan/nan.h: In function ‘bool Nan::IdleNotification(int)’: npm ERR! ../../nan/nan.h:684:63: warning: ‘bool v8::Isolate::IdleNotificationDeadline(double)’ is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations] npm ERR! 684 | return v8::Isolate::GetCurrent()->IdleNotificationDeadline( npm ERR! | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ npm ERR! 685 | idle_time_in_ms * 0.001); npm ERR! | ~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! In file included from /home/runner/.cache/node-gyp/20.8.1/include/node/v8-initialization.h:13, npm ERR! from /home/runner/.cache/node-gyp/20.8.1/include/node/v8.h:34, npm ERR! from /home/runner/.cache/node-gyp/20.8.1/include/node/node.h:73, npm ERR! from ../../nan/nan.h:58, npm ERR! from ../lib/./wrapped_re2.h:4, npm ERR! from ../lib/addon.cc:1: npm ERR! /home/runner/.cache/node-gyp/20.8.1/include/node/v8-isolate.h:1293:8: note: declared here npm ERR! 1293 | bool IdleNotificationDeadline(double deadline_in_seconds); npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! In file included from ../lib/./wrapped_re2.h:4, npm ERR! from ../lib/addon.cc:1: npm ERR! ../../nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local, v8::Local, Nan::GetterCallback, Nan::SetterCallback, v8::Local, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)’: npm ERR! ../../nan/nan.h:2544:19: error: no matching function for call to ‘v8::ObjectTemplate::SetAccessor(v8::Local&, void (*&)(v8::Local, const v8::PropertyCallbackInfo&), void (*&)(v8::Local, v8::Local, const v8::PropertyCallbackInfo&), v8::Local&, v8::AccessControl&, v8::PropertyAttribute&, Nan::imp::Sig&)’ npm ERR! 2544 | tpl->SetAccessor( npm ERR! | ~~~~~~~~~~~~~~~~^ npm ERR! 2545 | name npm ERR! | ~~~~ npm ERR! 2546 | , getter_ npm ERR! | ~~~~~~~~~ npm ERR! 2547 | , setter_ npm ERR! | ~~~~~~~~~ npm ERR! 2548 | , obj npm ERR! | ~~~~~ npm ERR! 2549 | , settings npm ERR! | ~~~~~~~~~~ npm ERR! 2550 | , attribute npm ERR! | ~~~~~~~~~~~ npm ERR! 2551 | , signature); npm ERR! | ~~~~~~~~~~~~ npm ERR! In file included from /home/runner/.cache/node-gyp/20.8.1/include/node/v8-function.h:15, npm ERR! from /home/runner/.cache/node-gyp/20.8.1/include/node/v8.h:33, npm ERR! from /home/runner/.cache/node-gyp/20.8.1/include/node/node.h:73, npm ERR! from ../../nan/nan.h:58, npm ERR! from ../lib/./wrapped_re2.h:4, npm ERR! from ../lib/addon.cc:1: npm ERR! /home/runner/.cache/node-gyp/20.8.1/include/node/v8-template.h:809:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’ npm ERR! 809 | void SetAccessor( npm ERR! | ^~~~~~~~~~~ npm ERR! /home/runner/.cache/node-gyp/20.8.1/include/node/v8-template.h:814:22: note: no known conversion for argument 7 from ‘Nan::imp::Sig’ {aka ‘int’} to ‘v8::SideEffectType’ npm ERR! 814 | SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, npm ERR! | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! /home/runner/.cache/node-gyp/20.8.1/include/node/v8-template.h:816:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’ npm ERR! 816 | void SetAccessor( npm ERR! | ^~~~~~~~~~~ npm ERR! /home/runner/.cache/node-gyp/20.8.1/include/node/v8-template.h:821:22: note: no known conversion for argument 7 from ‘Nan::imp::Sig’ {aka ‘int’} to ‘v8::SideEffectType’ npm ERR! 821 | SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, npm ERR! | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! make: *** [re2.target.mk:172: Release/obj.target/re2/lib/addon.o] Error 1 npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2 npm ERR! gyp ERR! stack at ChildProcess.onExit (/home/runner/work/eslint.org/eslint.org/node_modules/re2/node_modules/node-gyp/lib/build.js:194:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12) npm ERR! gyp ERR! System Linux 6.2.0-1014-azure npm ERR! gyp ERR! command "/opt/hostedtoolcache/node/20.8.1/x64/bin/node" "/home/runner/work/eslint.org/eslint.org/node_modules/re2/node_modules/.bin/node-gyp" "rebuild" npm ERR! gyp ERR! cwd /home/runner/work/eslint.org/eslint.org/node_modules/re2 npm ERR! gyp ERR! node -v v20.8.1 npm ERR! gyp ERR! node-gyp -v v8.4.1 npm ERR! gyp ERR! not ok npm ERR! node:internal/process/promises:289 npm ERR! triggerUncaughtException(err, true /* fromPromise */); npm ERR! ^ npm ERR! npm ERR! [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "1".] { npm ERR! code: 'ERR_UNHANDLED_REJECTION' npm ERR! } npm ERR! npm ERR! Node.js v20.8.1 npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@8.4.1 npm ERR! gyp info using node@20.8.1 | linux | x64 npm ERR! gyp info find Python using Python version 3.10.12 found at "/usr/bin/python3" npm ERR! gyp info spawn /usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/home/runner/work/eslint.org/eslint.org/node_modules/re2/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/runner/work/eslint.org/eslint.org/node_modules/re2/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/runner/work/eslint.org/eslint.org/node_modules/re2/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/runner/.cache/node-gyp/20.8.1/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/home/runner/.cache/node-gyp/20.8.1', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/runner/work/eslint.org/eslint.org/node_modules/re2/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/home/runner/.cache/node-gyp/20.8.1/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/runner/work/eslint.org/eslint.org/node_modules/re2', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! In file included from ../../nan/nan.h:178, npm ERR! from ../lib/./wrapped_re2.h:4, npm ERR! from ../lib/addon.cc:1: npm ERR! ../../nan/nan_callbacks.h:55:23: error: ‘AccessorSignature’ is not a member of ‘v8’ npm ERR! 55 | typedef v8::Local Sig; npm ERR! | ^~~~~~~~~~~~~~~~~ npm ERR! ../../nan/nan_callbacks.h:55:40: error: template argument 1 is invalid npm ERR! 55 | typedef v8::Local Sig; npm ERR! | ^ npm ERR! In file included from ../lib/./wrapped_re2.h:4, npm ERR! from ../lib/addon.cc:1: npm ERR! ../../nan/nan.h: In function ‘bool Nan::IdleNotification(int)’: npm ERR! ../../nan/nan.h:684:63: warning: ‘bool v8::Isolate::IdleNotificationDeadline(double)’ is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations] npm ERR! 684 | return v8::Isolate::GetCurrent()->IdleNotificationDeadline( npm ERR! | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ npm ERR! 685 | idle_time_in_ms * 0.001); npm ERR! | ~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! In file included from /home/runner/.cache/node-gyp/20.8.1/include/node/v8-initialization.h:13, npm ERR! from /home/runner/.cache/node-gyp/20.8.1/include/node/v8.h:34, npm ERR! from /home/runner/.cache/node-gyp/20.8.1/include/node/node.h:73, npm ERR! from ../../nan/nan.h:58, npm ERR! from ../lib/./wrapped_re2.h:4, npm ERR! from ../lib/addon.cc:1: npm ERR! /home/runner/.cache/node-gyp/20.8.1/include/node/v8-isolate.h:1293:8: note: declared here npm ERR! 1293 | bool IdleNotificationDeadline(double deadline_in_seconds); npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! In file included from ../lib/./wrapped_re2.h:4, npm ERR! from ../lib/addon.cc:1: npm ERR! ../../nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local, v8::Local, Nan::GetterCallback, Nan::SetterCallback, v8::Local, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)’: npm ERR! ../../nan/nan.h:2544:19: error: no matching function for call to ‘v8::ObjectTemplate::SetAccessor(v8::Local&, void (*&)(v8::Local, const v8::PropertyCallbackInfo&), void (*&)(v8::Local, v8::Local, const v8::PropertyCallbackInfo&), v8::Local&, v8::AccessControl&, v8::PropertyAttribute&, Nan::imp::Sig&)’ npm ERR! 2544 | tpl->SetAccessor( npm ERR! | ~~~~~~~~~~~~~~~~^ npm ERR! 2545 | name npm ERR! | ~~~~ npm ERR! 2546 | , getter_ npm ERR! | ~~~~~~~~~ npm ERR! 2547 | , setter_ npm ERR! | ~~~~~~~~~ npm ERR! 2548 | , obj npm ERR! | ~~~~~ npm ERR! 2549 | , settings npm ERR! | ~~~~~~~~~~ npm ERR! 2550 | , attribute npm ERR! | ~~~~~~~~~~~ npm ERR! 2551 | , signature); npm ERR! | ~~~~~~~~~~~~ npm ERR! In file included from /home/runner/.cache/node-gyp/20.8.1/include/node/v8-function.h:15, npm ERR! from /home/runner/.cache/node-gyp/20.8.1/include/node/v8.h:33, npm ERR! from /home/runner/.cache/node-gyp/20.8.1/include/node/node.h:73, npm ERR! from ../../nan/nan.h:58, npm ERR! from ../lib/./wrapped_re2.h:4, npm ERR! from ../lib/addon.cc:1: npm ERR! /home/runner/.cache/node-gyp/20.8.1/include/node/v8-template.h:809:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’ npm ERR! 809 | void SetAccessor( npm ERR! | ^~~~~~~~~~~ npm ERR! /home/runner/.cache/node-gyp/20.8.1/include/node/v8-template.h:814:22: note: no known conversion for argument 7 from ‘Nan::imp::Sig’ {aka ‘int’} to ‘v8::SideEffectType’ npm ERR! 814 | SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, npm ERR! | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! /home/runner/.cache/node-gyp/20.8.1/include/node/v8-template.h:816:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’ npm ERR! 816 | void SetAccessor( npm ERR! | ^~~~~~~~~~~ npm ERR! /home/runner/.cache/node-gyp/20.8.1/include/node/v8-template.h:821:22: note: no known conversion for argument 7 from ‘Nan::imp::Sig’ {aka ‘int’} to ‘v8::SideEffectType’ npm ERR! 821 | SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, npm ERR! | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! make: *** [re2.target.mk:172: Release/obj.target/re2/lib/addon.o] Error 1 npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2 npm ERR! gyp ERR! stack at ChildProcess.onExit (/home/runner/work/eslint.org/eslint.org/node_modules/re2/node_modules/node-gyp/lib/build.js:194:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12) npm ERR! gyp ERR! System Linux 6.2.0-1014-azure npm ERR! gyp ERR! command "/opt/hostedtoolcache/node/20.8.1/x64/bin/node" "/home/runner/work/eslint.org/eslint.org/node_modules/re2/node_modules/.bin/node-gyp" "rebuild" npm ERR! gyp ERR! cwd /home/runner/work/eslint.org/eslint.org/node_modules/re2 npm ERR! gyp ERR! node -v v20.8.1 npm ERR! gyp ERR! node-gyp -v v8.4.1 npm ERR! gyp ERR! not ok npm ERR! A complete log of this run can be found in: /home/runner/.npm/_logs/2023-10-25T15_37_06_376Z-debug-0.log Error: Process completed with exit code 1. ```
uhop commented 9 months ago

It looks like all errors are in the guts of NaN/V8 files. I just compiled locally and it WFM. Heads up: I am planning to release 1.20.5 today, which includes updated dependencies.

uhop commented 9 months ago

1.20.5 was published. All tests worked as expected: https://github.com/uhop/node-re2/actions/runs/6645063023

Please compare your case with the CI runs above — I hope it'll discover the problem. Likely it is some configuration difference.

uhop commented 9 months ago

BTW. Node 16 was EOL 6 weeks ago: https://endoflife.date/nodejs While re2 should work fine on Node 16, I suggest upgrading your CI runners.

nzakas commented 9 months ago

Looks like we are still getting the same compilation error. The CI is running on Node.js 20 and we don't have any trouble running on Node.js 16. We always run our CI tasks with the latest LTS.

It's worth noting that we are not running re2 directly -- it's a transitive dependency from metascraper-description, so it looks like it's just an old version we are pulling in from them.

uhop commented 9 months ago

What kind of package manager do you use? Is it npm or something else?

nzakas commented 9 months ago

It's npm.