uhop / node-re2

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

version 1.15.3 broken #76

Closed viceice closed 4 years ago

viceice commented 4 years ago
> yarn add -E re2@1.15.3
yarn add v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error ~/test/node_modules/re2: Command failed.
Exit code: 127
Command: install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR
Arguments:
Directory: ~/test/node_modules/re2
Output:
/bin/sh: 1: install-from-cache: not found
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
uhop commented 4 years ago

I fixed the problem in dependencies, and now it WFM.

I will produce a new version of re2 later — GitHub is down now.

Please try the existing version. It should pick up new versions of dependencies. Let me know if it works for you too.

uhop commented 4 years ago

Published finally: 1.15.4.

viceice commented 4 years ago

works thanks

malte-v commented 4 years ago

I'm getting this error with 1.15.4 and node2nix:

> re2@1.15.4 install /nix/store/bc7y3dmssp2ksvcs7pihvzgyln1ks4qr-node_forward-email-7.2.1/lib/node_modules/forward-email/node_modules/re2
> install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR

sh: install-from-cache: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! re2@1.15.4 install: `install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the re2@1.15.4 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /build/.npm/_logs/2020-10-03T12_17_44_216Z-debug.log

Could you tell me where this install-from-cache comes from?

malte-v commented 4 years ago

See https://github.com/svanderburg/node2nix/issues/68#issuecomment-354733864. I guess I'll have to patch it myself.

uhop commented 4 years ago

Could you tell me where this install-from-cache comes from?

Yes, of course. It is listed in direct dependencies: a module cryptically named install-artifact-from-github. To wit: https://github.com/uhop/node-re2/blob/master/package.json#L13

Could you tell me why that script was not installed and/or not found by npm even it was explicitly requested?

uhop commented 4 years ago

I released the fix: 1.15.5.

But sandbox or not calling non-global scripts should work. I suggest to look into that and fix it at the source rather than relying on non-standard behavior. BTW, even if there is no internet connection the script supposed to work properly and initiate the local build.

PS: And it is better to open a new issue ticket then reusing old ones --- easier to track.