Description
DESCRIPTION
The npm install script calls "python" but does not reference an explicit version. However it depends on python2. If python3 is installed and is set as the default python
, the install will fail. However, there is a simple workaround, setting default python to be python2 (see WORKAROUND).
TO REPRODUCE
- Install python3 and have that as your default "python"
- Run
npm i -g polkadot-deployer
EXPECTED BEHAVIOR
Installs
OBSERVED BEHAVIOR
Error in secp256k1 dependency - see below
WORKAROUND
I simply aliased my python and pip to call explicitly call version 2:
alias python=python2
alias pip=pip2
Maybe just add this to the README.md if it doesn't work on someone's machine?
NOTES
Output from my console
(20027) $ npm i -g polkadot-deployer
npm WARN deprecated joi@13.7.0: 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 topo@3.0.3: This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated hoek@5.0.4: 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 hoek@6.1.3: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
/Users/laboon/.nvm/versions/node/v10.7.0/bin/polkadot-deployer -> /Users/laboon/.nvm/versions/node/v10.7.0/lib/node_modules/polkadot-deployer/index.js
secp256k1@3.7.0 install /Users/laboon/.nvm/versions/node/v10.7.0/lib/node_modules/polkadot-deployer/node_modules/secp256k1
npm run rebuild || echo "Secp256k1 bindings compilation fail. Pure JS implementation will be used."
secp256k1@3.7.0 rebuild /Users/laboon/.nvm/versions/node/v10.7.0/lib/node_modules/polkadot-deployer/node_modules/secp256k1
node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Python executable "/usr/local/opt/python/libexec/bin/python" is v3.7.3, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at PythonFinder.failPythonVersion (/Users/laboon/.nvm/versions/node/v10.7.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:492:19)
gyp ERR! stack at PythonFinder. (/Users/laboon/.nvm/versions/node/v10.7.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:474:14)
gyp ERR! stack at ChildProcess.exithandler (child_process.js:282:7)
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 Darwin 18.5.0
gyp ERR! command "/Users/laboon/.nvm/versions/node/v10.7.0/bin/node" "/Users/laboon/.nvm/versions/node/v10.7.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/laboon/.nvm/versions/node/v10.7.0/lib/node_modules/polkadot-deployer/node_modules/secp256k1
gyp ERR! node -v v10.7.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! secp256k1@3.7.0 rebuild: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the secp256k1@3.7.0 rebuild 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! /Users/laboon/.npm/_logs/2019-05-15T14_52_52_462Z-debug.log
Secp256k1 bindings compilation fail. Pure JS implementation will be used.
- polkadot-deployer@0.5.0
added 181 packages from 207 contributors in 16.598s