Closed huba closed 6 years ago
I tested this by first foobar-ing the python2
symlink in my path. Then I tried running apm install
on c12d048078112748325d681c8f371c0f21df6ba7 which failed like so:
...
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/lib/node_modules/atom-package-manager/bin/python-interceptor.sh -c import platform; print(platform.python_version());
gyp ERR! stack /usr/lib/node_modules/atom-package-manager/bin/python-interceptor.sh: line 40: exec: python2: not found
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:291:12)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:380:11)
gyp ERR! stack at Socket.emit (events.js:182:13)
gyp ERR! stack at Pipe._handle.close (net.js:599:12)
gyp ERR! System Linux 4.17.8-1-ARCH
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/huba/code/script-runner/node_modules/node-pty
gyp ERR! node -v v10.7.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-pty@0.7.6 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-pty@0.7.6 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/huba/.atom/.apm/_logs/2018-07-29T21_43_28_392Z-debug.log
...
Then I checked that apm install
works on 9b9840f6275f69b3fb4ee88fe0374878a8a94a4f, which it does.
...
Installing modules
> node-pty-prebuilt@0.7.3 install /home/huba/code/script-runner/node_modules/node-pty-prebuilt
> prebuild-install || node scripts/install.js
> node-pty-prebuilt@0.7.3 postinstall /home/huba/code/script-runner/node_modules/node-pty-prebuilt
> node scripts/post-install.js
...
It's worth noting that this will still revert back to node-gyp
for people with really obscure architectures or ABIs for which there are no prebuilt versions available. A list of prebuilt versions available is found on https://github.com/daviwil/node-pty-prebuilt/releases.
This should fix issue #87 for most people in the interim (most likely forever) until
node-gyp
gets fixed or eradicated from the node.js ecosystem.