Reputation: 237
I have tried installed hyper ledger composer CLI & its development tools but got errors. like the
npm WARN deprecated fs-promise@1.0.0: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated crypto@0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in. npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer npm WARN deprecated constantinople@3.0.2: Please update to at least constantinople 3.1.1 npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/ npm WARN deprecated socks@1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0 npm WARN deprecated mailcomposer@4.0.1: This project is unmaintained npm WARN deprecated buildmail@4.0.1: This project is unmaintained /root/.nvm/versions/node/v8.10.0/bin/composer -> /root/.nvm/versions/node/v8.10.0/lib/node_modules/composer-cli/cli.js
pkcs11js@1.0.14 install /root/.nvm/versions/node/v8.10.0/lib/node_modules/composer-cli/node_modules/pkcs11js node-gyp rebuild
sh: 1: node-gyp: Permission denied npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/composer-cli/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! pkcs11js@1.0.14 install: node-gyp rebuild
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the pkcs11js@1.0.14 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! /root/.npm/_logs/2018-03-24T02_16_27_676Z-debug.log root@Composer:~# npm install -g composer-rest-server npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade npm WARN deprecated fs-promise@1.0.0: Use mz or fs-extra^3.0 with Promise Support npm WARN deprecated crypto@0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in. npm WARN deprecated constantinople@3.0.2: Please update to at least constantinople 3.1.1 npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/ npm WARN deprecated mailcomposer@4.0.1: This project is unmaintained npm WARN deprecated socks@1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0 npm WARN deprecated buildmail@4.0.1: This project is unmaintained /root/.nvm/versions/node/v8.10.0/bin/composer-rest-server -> /root/.nvm/versions/node/v8.10.0/lib/node_modules/composer-rest-server/cli.js
pkcs11js@1.0.14 install /root/.nvm/versions/node/v8.10.0/lib/node_modules/composer-rest-server/node_modules/pkcs11js node-gyp rebuild
sh: 1: node-gyp: Permission denied
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! pkcs11js@1.0.14 install: node-gyp rebuild
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the pkcs11js@1.0.14 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! /root/.npm/_logs/2018-03-24T02_16_58_032Z-debug.log root@Composer:~# npm install -g generator-hyperledger-composer npm WARN deprecated fs-promise@1.0.0: Use mz or fs-extra^3.0 with Promise Support npm WARN deprecated crypto@0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in. npm WARN deprecated formatio@1.2.0: This package is unmaintained. Use @sinonjs/formatio instead
pkcs11js@1.0.14 install /root/.nvm/versions/node/v8.10.0/lib/node_modules/generator-hyperledger-composer/node_modules/pkcs11js node-gyp rebuild
sh: 1: node-gyp: Permission denied
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! pkcs11js@1.0.14 install: node-gyp rebuild
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the pkcs11js@1.0.14 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! /root/.npm/_logs/2018-03-24T02_17_21_569Z-debug.log
Whats the best way or single line command to install the composer on ubuntu ?
the i tried to install the cli as sudo user : got this error :
i tried to install the composer cli as sudo user: got this : "swap@composer:~$ npm install -g composer-cli
npm WARN deprecated fs-promise@1.0.0: Use mz or fs-extra^3.0 with Promise Support npm WARN deprecated crypto@0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in. npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer npm WARN deprecated constantinople@3.0.2: Please update to at least constantinople 3.1.1 npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/ npm WARN deprecated socks@1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0 npm WARN deprecated mailcomposer@4.0.1: This project is unmaintained npm WARN deprecated buildmail@4.0.1: This project is unmaintained /home/swap/.nvm/versions/node/v8.10.0/bin/composer -> /home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/composer-cli/cli.js
pkcs11js@1.0.14 install /home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/composer-cli/node_modules/pkcs11js node-gyp rebuild
Traceback (most recent call last):
File "/home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/gyp_main.py", line 13, in
import gyp
File "/home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 8, in
import gyp.input
File "/home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 5, in
from compiler.ast import Const
ImportError: No module named compiler.ast
gyp ERR! configure error
gyp ERR! stack Error: gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.4.0-109-generic
gyp ERR! command "/home/swap/.nvm/versions/node/v8.10.0/bin/node" "/home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/composer-cli/node_modules/pkcs11js
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/composer-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pkcs11js@1.0.14 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pkcs11js@1.0.14 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
"
please guide
Upvotes: 0
Views: 646
Reputation: 8184
I would run a npm update
and take a look at this two links:
https://hyperledger.github.io/composer/installing/installing-prereqs
and
https://hyperledger.github.io/composer/reference/commands.html
Read with care about the requisites. And I also notice the information:
Please note: When using Ubuntu this command will fail when running in a root user shell.
Upvotes: 1