1
votes

I get that error when trying to install cli tools, I set up python version to 2.7 and I installed node-gyp but it didn't help

users-Air:~ user$ npm install -g [email protected]

/Users/user/.nvm/versions/node/v10.13.0/bin/composer -> /Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/cli.js

[email protected] install /Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/dtrace-provider

node-gyp rebuild || node suppress-error.js

gyp ERR! configure error

gyp ERR! stack Error: Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable.

gyp ERR! stack at PythonFinder.failNoPython (/Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:484:19)

gyp ERR! stack at PythonFinder. (/Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:406:16)

gyp ERR! stack at F (/Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/which/which.js:68:16)

gyp ERR! stack at E (/Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/which/which.js:80:29)

gyp ERR! stack at /Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/which/which.js:89:16

gyp ERR! stack at /Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/isexe/index.js:42:5

gyp ERR! stack at /Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/isexe/mode.js:8:5

gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)

gyp ERR! System Darwin 17.5.0

gyp ERR! command "/Users/user/.nvm/versions/node/v10.13.0/bin/node" "/Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

gyp ERR! cwd /Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/dtrace-provider

gyp ERR! node -v v10.13.0

gyp ERR! node-gyp -v v3.8.0

gyp ERR! not ok

[email protected] install /Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/fsevents

node install

[fsevents] Success: "/Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed

Pass --update-binary to reinstall or --build-from-source to recompile

[email protected] install /Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/node-report

node-gyp rebuild

gyp ERR! configure error

gyp ERR! stack Error: Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable.

gyp ERR! stack at PythonFinder.failNoPython (/Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:484:19)

gyp ERR! stack at PythonFinder. (/Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:406:16)

gyp ERR! stack at F (/Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/which/which.js:68:16)

gyp ERR! stack at E (/Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/which/which.js:80:29)

gyp ERR! stack at /Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/which/which.js:89:16

gyp ERR! stack at /Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/isexe/index.js:42:5

gyp ERR! stack at /Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/isexe/mode.js:8:5

gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)

gyp ERR! System Darwin 17.5.0

gyp ERR! command "/Users/user/.nvm/versions/node/v10.13.0/bin/node" "/Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

gyp ERR! cwd /Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/node-report

gyp ERR! node -v v10.13.0

gyp ERR! node-gyp -v v3.8.0

gyp ERR! not ok

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! [email protected] install: node-gyp rebuild

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the [email protected] 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! /Users/user/.npm/_logs/2018-11-01T16_00_13_969Z-debug.log

1
hi there, you need to check you meet all the pre-reqs here -> hyperledger.github.io/composer/latest/installing/… - You're using Node 10 and it is not supported by Hyperledger Composer - check the docs for the exact Node editions supported and use nvm to install a supported Node versionPaul O'Mahony
The answer was deleted and I can't point you to the other stackoverflow because the top answer is not a good solution to the problem. So what you need to do in a command window is 1) nvm install 8. 2) nvm use 8. Now you can install composer again. The reason is that node 10 has gone LTS and the prereqs-ubuntu script installs the lts version which means node 10 is currently being installeddavid_k

1 Answers

1
votes

You are using node js version 10.x.x, which is not supported by Hyperledger.

Please install node js version 8.x.x.

It will solve your problem.

Note: Make sure that you are installing composer tools as non-root user. Install composer tools without sudo.