Open zsmith3 opened 6 years ago
I'm bumping this because I this issue just consumed ~10 hours for me to debug.
This build operates under the assumption that the the shell command python
( whether by alias, symlink, or binary ) will invoke a Python 2.x interpreter.
There seems to be no attempt whatsoever by the build to "see if this system's python
command is associated with v1, v2, or v3"; nor does it prompt the user in any sane manner when one could not be found - instead we get an incredibly unhelpful runtime crash from node-gyp
indicating something to the effect of "file not found", or whatever Python v2/v3 syntax error happens to crop up first.
I am happy to make a PR to perform a rudimentary check for dependencies if someone would be kind enough to point me in the appropriate area of the code-base to dig into. I'm going to wager the node-gyp
stuff might be the real culprit, but something like a "pre-build hook" would be an appropriate opportunity to run this type of audit.
I run the following:
npm install msgpack
and get:
Because I have Python 3.6 in my PATH, it attempts to use that to run a command which is designed for Python 2, so it fails to install.
I then ran the following:
...and the installation worked fine. However, this step shouldn't be necessary, and I wouldn't have thought that having Python 3 in the PATH was such an unusual circumstance.
I don't know enough about NPM packaging to understand where the problem is (or how it might be fixed) but this seemed like the best place to post this issue.