node-gyp rebuild fails with Python traceback 'module 'collections' has no attribute 'MutableSet''
binhex opened this issue · 1 comments
binhex commented
Attempting to run node-gyp rebuild fails with Python module missing attribute, this is pulling down from mineos-node Master branch running Python 3.10.
Link to issue that looks related:- https://bugzilla.redhat.com/show_bug.cgi?id=1791952
Log:-
> posix@4.2.0 install /opt/mineos/node_modules/posix
> node-gyp rebuild
Traceback (most recent call last):
File "/home/nobody/.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/nobody/.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/nobody/.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/nobody/.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/nobody/.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.11.0-1028-azure
gyp ERR! command "/home/nobody/.nvm/versions/node/v8.17.0/bin/node" "/home/nobody/.nvm/versions/node/v8.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/mineos/node_modules/posix
gyp ERR! node -v v8.17.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! posix@4.2.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the posix@4.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
binhex commented
ok it's 2 years on and this is still in the same state, any chance of a fix please?