Closed csydvs closed 1 year ago
hmm
node-gyp suggest npm install -g node-gyp
on the end user side.
We have some troubleshooting notes here that warrant updating :)
The global node-gyp
install didn't work for me, but another good option for anyone who runs into this is to run npm config set python <different version of python>
to downgrade the version of python that node uses to something lower that you have locally.
Thanks for the update,
I saw the same issue running node 15 in a test earlier today
This line fixed it
taken from node-gyp's guide
passing run
node-gyp suggest
npm install -g node-gyp
on the end user side.
This cannot be the solution, though. A simple npm i
on every machine that has Python 3 installed (no matter if 3.10 or 3.11) should just work.
This line fixed it
The same goes for the pipelines. You should not be required to take additional steps to just install the pact package.
Couldn't the node-gyp
(current version) be a devDependency of pact-core
that is then used for the postinstall step?
Out of curiosity: Why are you (transitively) depending on Python in a node project in the first place? This seems a little odd.
It's not the only javascript project to do so
see electrons guidance
https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules
See this issue for https://github.com/pact-foundation/pact-js/issues/899 for tracking.
I agree its suboptimal
Happy for someone to propose a PR with the suggested change
The same goes for the pipelines. You should not be required to take additional steps to just install the pact package.
I don't agree, you may have to take additional steps, dependant on the package and how its built, that is just life, however they should be very well documented, so as to cause minimal frustration to end users.
Closing this issue as invalid
node-gyp-build isn't included in the package.json for pact-js and its core pact-js-core
https://github.com/pact-foundation/pact-js/blob/master/package.json https://github.com/pact-foundation/pact-js-core/blob/master/package.json
If anyone stumbles here again...
Change the line with the error from rU to r, and run 'nmp rebuild'
thanks, they should just install the latest version 12.x or later as that doesn't require this build step at all 👍🏾
Software versions
Please provide at least OS and version of pact-js
Issue Checklist
Please confirm the following:
Expected behaviour
Just trying to run
npm i -S @pact-foundation/pact@latest
on a box with python 3.11.2 installed, would like it to installActual behaviour
Error encountered. See this gyp issue for more info on what's going on here.
Relevant log files