openstf / stf

Control and manage Android devices from your browser.
https://openstf.io
Other
13.16k stars 2.7k forks source link

Unable to install STF due to gyp ERR! configure error #1341

Open sudarkashyap opened 1 year ago

sudarkashyap commented 1 year ago

What is the issue or idea you have? npm install -g stf is failing on both Ubuntu (22.04.1 LTS) and MacOS (12.6.1)

Please provide the steps to reproduce the issue. Followed all pre-requisites and steps mentioned in https://github.com/openstf/stf#requirements

What is the expected behavior? npm install -g stf must succeed without error

Do you see errors or warnings in the stf local output? If so, please paste them or the full log here. I get following error when I run "npm install -g stf"

username@ub2ed4d72369c52:~$ npm install -g stf
npm WARN deprecated @slack/client@3.16.0: Slack Client is deprecated - Use @slack/web-api, @slack/rtm-api, or @slack/webhook instead.
npm WARN deprecated csurf@1.11.0: Please use another csrf package
npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated passport-saml@0.15.0: For versions >= 4, please use scopped package @node-saml/passport-saml
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
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 request@2.76.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@2.0.6: this library is no longer supported
npm WARN deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated highlight.js@8.2.0: Version no longer supported. Upgrade to @latest
npm WARN deprecated xmldom@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated xmldom@0.1.19: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated ejs@0.8.8: Critical security bugs fixed in 2.5.5
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 WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated multer@1.4.4: Multer 1.x is affected by CVE-2022-24434. This is fixed in v1.4.4-lts.1 which drops support for versions of Node.js before 6. Please upgrade to at least Node.js 6 and version 1.4.4-lts.1 of Multer. If you need support for older versions of Node.js, we are open to accepting patches that would fix the CVE on the main 1.x release line, whilst maintaining compatibility with Node.js 0.10.
npm WARN deprecated swagger-methods@1.0.8: This package is no longer being maintained.
npm WARN deprecated superagent@7.1.6: Please downgrade to v7.1.5 if you need IE/ActiveXObject support OR upgrade to v8.0.0 as we no longer support IE and published an incorrect patch version (see https://github.com/visionmedia/superagent/issues/1731)
/home/username/.nvm/versions/node/v8.17.0/bin/stf -> /home/username/.nvm/versions/node/v8.17.0/lib/node_modules/stf/bin/stf

> dtrace-provider@0.8.8 install /home/username/.nvm/versions/node/v8.17.0/lib/node_modules/stf/node_modules/dtrace-provider
> node-gyp rebuild || node suppress-error.js

Traceback (most recent call last):
  File "/home/username/.nvm/versions/node/v8.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 47, in <module>
    import gyp
  File "/home/username/.nvm/versions/node/v8.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 10, in <module>
    import gyp.input
  File "/home/username/.nvm/versions/node/v8.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 9, in <module>
    import gyp.common
  File "/home/username/.nvm/versions/node/v8.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py", line 499, in <module>
    class OrderedSet(collections.MutableSet):
AttributeError: module 'collections' has no attribute 'MutableSet'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/username/.nvm/versions/node/v8.17.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 5.15.0-57-generic
gyp ERR! command "/home/username/.nvm/versions/node/v8.17.0/bin/node" "/home/username/.nvm/versions/node/v8.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/username/.nvm/versions/node/v8.17.0/lib/node_modules/stf/node_modules/dtrace-provider
gyp ERR! node -v v8.17.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 

> bufferutil@1.3.0 install /home/username/.nvm/versions/node/v8.17.0/lib/node_modules/stf/node_modules/bufferutil
> node-gyp rebuild

Traceback (most recent call last):
  File "/home/username/.nvm/versions/node/v8.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 47, in <module>
    import gyp
  File "/home/username/.nvm/versions/node/v8.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 10, in <module>
    import gyp.input
  File "/home/username/.nvm/versions/node/v8.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 9, in <module>
    import gyp.common
  File "/home/username/.nvm/versions/node/v8.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py", line 499, in <module>
    class OrderedSet(collections.MutableSet):
AttributeError: module 'collections' has no attribute 'MutableSet'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/username/.nvm/versions/node/v8.17.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 5.15.0-57-generic
gyp ERR! command "/home/username/.nvm/versions/node/v8.17.0/bin/node" "/home/username/.nvm/versions/node/v8.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/username/.nvm/versions/node/v8.17.0/lib/node_modules/stf/node_modules/bufferutil
gyp ERR! node -v v8.17.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN notsup Unsupported engine for aws-sdk@2.1297.0: wanted: {"node":">= 10.0.0"} (current: {"node":"8.17.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: aws-sdk@2.1297.0
npm WARN notsup Unsupported engine for gm@1.25.0: wanted: {"node":">=14"} (current: {"node":"8.17.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: gm@1.25.0
npm WARN notsup Unsupported engine for socket.io-parser@3.4.2: wanted: {"node":">=10.0.0"} (current: {"node":"8.17.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: socket.io-parser@3.4.2
npm WARN notsup Unsupported engine for semver@7.3.8: wanted: {"node":">=10"} (current: {"node":"8.17.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: semver@7.3.8
npm WARN notsup Unsupported engine for lru-cache@6.0.0: wanted: {"node":">=10"} (current: {"node":"8.17.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: lru-cache@6.0.0

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bufferutil@1.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bufferutil@1.3.0 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/username/.npm/_logs/2023-01-19T01_14_15_770Z-debug.log

Please run stf doctor and paste the output here. Unable to install stf so cannot perform stf doctor