Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails due to node-gyp requiring a more recent nodejs version for z3javascript #114

Open
JJK96 opened this issue Feb 16, 2024 · 1 comment

Comments

@JJK96
Copy link

JJK96 commented Feb 16, 2024

I first tried building on MacOS and ran into this issue. To make it easier for you to reproduce the issue, I upgraded the Dockerfile to match the latest install instruction. You can find the changes in my fork.

The build error is as follows:

Setting up for Node
v14.16.1
Installing top level
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 443 packages from 304 contributors and audited 444 packages in 25.174s

36 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Setting Up Packages
Cleaning lib/S$
Setting up lib/S$
Pulling Dependencies
npm WARN [email protected] No repository field.
npm WARN [email protected] license should be a valid SPDX license expression

up to date in 0.521s
found 0 vulnerabilities

Cleaning lib/Stats
Setting up lib/Stats
Pulling Dependencies
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

up to date in 0.505s
found 0 vulnerabilities

Cleaning Analyser
Setting up Analyser
Pulling Dependencies
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm WARN deprecated [email protected]: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm WARN deprecated [email protected]: This NPM package for DataTables has now been deprecated and the 'datatables.net' set of packages should be used in preference to this one. Please see the NPM installation guide for DataTables for more details: https://datatables.net/download/npm.
npm WARN deprecated [email protected]: 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 WARN deprecated [email protected]: This module relies on Node.js's internals and will break at some point. Do not use it, and update to [email protected].

> [email protected] postinstall /source/Analyser/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> [email protected] postinstall /source/Analyser
> ./scripts/postinstall

npm WARN deprecated [email protected]: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm WARN deprecated [email protected]: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm WARN deprecated [email protected]: This NPM package for DataTables has now been deprecated and the 'datatables.net' set of packages should be used in preference to this one. Please see the NPM installation guide for DataTables for more details: https://datatables.net/download/npm.
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: 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 WARN deprecated [email protected]: This module relies on Node.js's internals and will break at some point. Do not use it, and update to [email protected].
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: to-iso-string has been deprecated, use @segment/to-iso-string instead.

> [email protected] postinstall /source/Analyser/node_modules/jalangi2/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

npm notice created a lockfile as package-lock.json. You should commit this file.
added 146 packages from 825 contributors and audited 148 packages in 10.81s

4 packages are looking for funding
  run `npm fund` for details

found 29 vulnerabilities (18 moderate, 7 high, 4 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
Cloning into 'node_modules/z3javascript'...

> [email protected] install /source/Analyser/node_modules/z3javascript/node_modules/ref-napi
> node-gyp-build


> [email protected] install /source/Analyser/node_modules/z3javascript/node_modules/ffi-napi
> node-gyp-build

gyp ERR! configure error
gyp ERR! stack TypeError: Cannot read property 'pipeline' of undefined
gyp ERR! stack at Object.<anonymous> (/source/Analyser/node_modules/z3javascript/node_modules/node-gyp/lib/install.js:8:32)
gyp ERR! stack at Module._compile (internal/modules/cjs/loader.js:1063:30)
gyp ERR! stack at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
gyp ERR! stack at Module.load (internal/modules/cjs/loader.js:928:32)
gyp ERR! stack at Function.Module._load (internal/modules/cjs/loader.js:769:14)
gyp ERR! stack at Module.require (internal/modules/cjs/loader.js:952:19)
gyp ERR! stack at require (internal/modules/cjs/helpers.js:88:18)
gyp ERR! stack at Object.acc.<computed> [as install] (/source/Analyser/node_modules/z3javascript/node_modules/node-gyp/lib/node-gyp.js:80:32)
gyp ERR! stack at getNodeDir (/source/Analyser/node_modules/z3javascript/node_modules/node-gyp/lib/configure.js:53:26)
gyp ERR! stack at configure (/source/Analyser/node_modules/z3javascript/node_modules/node-gyp/lib/configure.js:24:10)
gyp ERR! System Linux 5.15.0-92-generic
gyp ERR! command "/home/expose/.local/share/fnm/node-versions/v14.16.1/installation/bin/node" "/source/Analyser/node_modules/z3javascript/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /source/Analyser/node_modules/z3javascript/node_modules/ffi-napi
gyp ERR! node -v v14.16.1
gyp ERR! node-gyp -v v10.0.1
gyp ERR! not ok
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"^16.14.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=16 || 14 >=14.17"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"^16.14.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"^14.17.0 || ^16.13.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"^16.13.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"^14.17.0 || ^16.13.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=16 || 14 >=14.17"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=16 || 14 >=14.17"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=16 || 14 >=14.17"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for @npmcli/[email protected]: wanted: {"node":"^16.14.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: @npmcli/[email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"^16.14.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"^14.17.0 || ^16.13.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"^14.17.0 || ^16.13.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=16 || 14 >=14.17"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=16 || 14 >=14.17"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"^14.17.0 || ^16.13.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for @npmcli/[email protected]: wanted: {"node":"^14.17.0 || ^16.13.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: @npmcli/[email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"^14.17.0 || ^16.13.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=16 || 14 >=14.17"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"^14.17.0 || ^16.13.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"^14.17.0 || ^16.13.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=16"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] license should be a valid SPDX license expression

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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!     /home/expose/.npm/_logs/2024-02-16T13_19_25_449Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `./scripts/postinstall`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall 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!     /home/expose/.npm/_logs/2024-02-16T13_19_25_553Z-debug.log
Cleaning Tester
Setting up Tester
Pulling Dependencies

> [email protected] postinstall /source/Tester/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

npm WARN [email protected] No repository field.
npm WARN [email protected] license should be a valid SPDX license expression
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 319 packages from 132 contributors and audited 323 packages in 13.096s

6 packages are looking for funding
  run `npm fund` for details

found 6 vulnerabilities (2 low, 4 high)
  run `npm audit fix` to fix them, or `npm audit` for details
Cleaning Distributor
Setting up Distributor
Pulling Dependencies
npm WARN [email protected] No repository field.
npm WARN [email protected] license should be a valid SPDX license expression

added 17 packages from 14 contributors and audited 17 packages in 1.376s

2 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Cleaning Dashboard
./scripts/setup/cleanup: line 3: cd: Dashboard: No such file or directory
Setting up Dashboard
Pulling Dependencies
./scripts/setup/setup_pkg: line 7: cd: Dashboard: No such file or directory
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 443 packages from 304 contributors and audited 444 packages in 19.767s

36 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Cleaning Browser
Setting up Browser
Pulling Dependencies

> [email protected] postinstall /source/Browser/node_modules/electron
> node install.js

Downloading SHASUMS256.txt
[============================================>] 100.0% of 5.39 kB (5.39 kB/s)
npm WARN [email protected] No repository field.

added 115 packages from 115 contributors and audited 115 packages in 19.552s

4 packages are looking for funding
  run `npm fund` for details

found 16 vulnerabilities (3 low, 10 moderate, 3 high)
  run `npm audit fix` to fix them, or `npm audit` for details
Building Analyser

/source/.eslintrc.json
  0:0  warning  File ignored by default.  Use a negated ignore pattern (like "--ignore-pattern '!<relative/path/to/filename>'") to override

/source/Distributor/src/Spawn.js
  99:21  warning  Unnecessary escape character: \/  no-useless-escape

✖ 2 problems (0 errors, 2 warnings)

Building Libs
Successfully compiled 1 file with Babel (1123ms).
Building Distributor
Successfully compiled 15 files with Babel (2052ms).
Building Analyser
Successfully compiled 24 files with Babel (2303ms).
Building into /source
Bundling Analyser/bin/Analyser.js into bin/bundle.js
Copying Analyser Dependencies to Browser
@dan-mk
Copy link

dan-mk commented Feb 25, 2024

Thank you so much for the fork with the changes @JJK96, I could finally run the code and do some tests. I guess you were already able to find a workaround, but if anyone still needs it, here it is.

The problem is that the z3javascript package requires the most recent version of node-gyp (like this, with an asterisk "node-gyp": "*"). I just changed it to require the version 9.4.1, as it seems like it's the last one that is still working. Just change the Analyser's postinstall script to this:

(cd node_modules/jalangi2/ && npm install)
(
  git clone https://github.com/ExpoSEJS/z3javascript.git node_modules/z3javascript
  && cd node_modules/z3javascript
  && sed -i'' -e 's/"node-gyp": "\*"/"node-gyp": "9.4.1"/' package.json
  && npm install
)

i.e. just add the sed -i'' -e 's/"node-gyp": "\*"/"node-gyp": "9.4.1"/' package.json command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants