uhop / install-artifact-from-github

No-dependency micro helper for developers of binary addons for Node that checks the cache for an artifact before attempting to build a project. Save time for your users!
Other
6 stars 3 forks source link

SyntaxError at line 84 #4

Closed wildufo closed 10 months ago

wildufo commented 1 year ago

Hello,

All I got is

`npm install --unsafe-perm

re2@1.15.4 install /root/re2build/node-re2 install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR

/root/re2build/node-re2/node_modules/install-artifact-from-github/bin/install-from-cache.js:84 const isDev = async () => { ^

SyntaxError: Unexpected token ( at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:549:28) at Object.Module._extensions..js (module.js:586:10) at Module.load (module.js:494:32) at tryModuleLoad (module.js:453:12) at Function.Module._load (module.js:445:3) at Module.runMain (module.js:611:10) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:160:9)`

(I have 0 idea about nodjs.)

uhop commented 1 year ago

It looks like your Node is old and doesn't support asynchronous functions. Could you share what version yo use? You can get it by running node --version.

wildufo commented 1 year ago

Yep it was the node version, took some time by trial and error. Maybe you could add required version to the readme for inexperienced ones like me :)

uhop commented 10 months ago

I think that nowadays it is hard to find Node that doesn't support async functions. Even a top-level await has been supported since Node 13.3. But I'll add a note to the wiki.