Closed goroot closed 6 years ago
I have something similar. Any resolution to this?
This error looks like docker is not running on your system. What OS are you using (Mac OSX or Ubuntu 16?)
Currently I am receiving something like this: I am running it on High Sierra 10.13.3. Docker seems to be running. Thank you in advance for your hints!
Pavols-MacBook-Pro:Chapter03 root# ./buildAndDeploy
network archive, start and deploy script for the Zero To Blockchain Series
This has been tested on Mac OSX thru High Sierra and Ubuntu V16 LTS
This script will create your Composer archive
-----> creating archive
=====================================================
=====================================================
-----> option passed for network name is: 'zerotoblockchain-network'
=====================================================
archive creation script for the Zero To Blockchain Series
This has been tested on Mac OSX thru High Sierra and Ubuntu V16 LTS
This script will create your Composer archive
-----> creating archive
=====================================================
Creating Business Network Archive
Looking for package.json of Business Network Definition Input directory: /Users/Documents/ZeroToBlockchain/Chapter03/network
Found: Description: Zero to Blockchain tutorial network Name: zerotoblockchain-network Identifier: zerotoblockchain-network@0.1.5
Written Business Network Definition Archive file to Output file: ./dist/zerotoblockchain-network.bna
Command succeeded
=====================================================
-----> starting network
=====================================================
=====================================================
-----> using execs from previous installation, stored in
=====================================================
=====================================================
-----> starting fabric
=====================================================
-----> creating new PeerAdmin card (required with each restart)
=====================================================
./startup.sh: line 44: ./createPeerAdminCard.sh: No such file or directory composer card list
List all business network cards
Options: --help Show help [boolean] -v, --version Show version number [boolean] --card, -c The name of the card to list [string] --quiet, -q Only display the card name [boolean]
-----> start up complete
=====================================================
=====================================================
-----> deploying network
=====================================================
=====================================================
-----> option passed for network name is: 'zerotoblockchain-network'
=====================================================
network deploy script for the Zero To Blockchain Series
This has been successfully tested on OSX Sierra and Ubuntu 16.04
This script will create your Composer archive
-----> deploying network
=====================================================
=====================================================
-----> installing PeerAdmin card
=====================================================
composer
Commands:
composer archive
Options: --help Show help [boolean] -v, --version Show version number [boolean]
Examples: composer archive create composer identity issue composer network install composer participant add composer transaction submit
For more information on Hyperledger Composer: https://hyperledger.github.io/composer/
-----> starting network
=====================================================
composer network start [options]
Starts a specific version of a business network that is already installed to Hyperledger Fabric
Options: --help Show help [boolean] -v, --version Show version number [boolean] --card, -c The cardname to use to start the network [string] [required] --networkName, -n Name of the business network to start [required] --networkVersion, -V Version of the business network to start [required] --loglevel, -l The initial loglevel to set [choices: "INFO", "WARNING", "ERROR", "DEBUG"] --option, -o Options that are specific specific to connection. Multiple options are specified by repeating this option [string] --optionsFile, -O A file containing options that are specific to connection [string] --networkAdmin, -A The identity name of the business network administrator [string] [required] --networkAdminCertificateFile, -C The certificate of the business network administrator [string] --networkAdminEnrollSecret, -S The enrollment secret for the business network administrator [string] --file, -f File name of the card to be created [string]
-----> importing networkadmin card
=====================================================
composer card list
List all business network cards
Options: --help Show help [boolean] -v, --version Show version number [boolean] --card, -c The name of the card to list [string] --quiet, -q Only display the card name [boolean]
Unknown argument: n
Failed to import the business network card
keyword: required
dataPath:
schemaPath: #/required
params:
missingProperty: x-type
message: should have required property 'x-type'
keyword: required
dataPath:
schemaPath: #/required
params:
missingProperty: client
message: should have required property 'client'
keyword: required
dataPath:
schemaPath: #/required
params:
missingProperty: certificateAuthorities
message: should have required property 'certificateAuthorities'
keyword: required
dataPath:
schemaPath: #/required
params:
missingProperty: channels
message: should have required property 'channels'
keyword: type dataPath: .orderers schemaPath: #/type params: type: object message: should be object
keyword: type dataPath: .peers schemaPath: #/type params: type: object message: should be object
Error: Errors found in the connection profile in the card Command failed
=====================================================
-----> pinging admin@zerotoblockchain-network card
=====================================================
Error: Card not found: admin@zerotoblockchain-network Command failed
=====================================================
-----> starting REST server
=====================================================
network archive, start and deploy script for the Zero To Blockchain Series
This has been tested on Mac OSX thru High Sierra and Ubuntu V16 LTS
This script will create your Composer archive
-----> testing rest server
when this completes,
go to your favorite browser
and enter localhost:3000/explorer
=====================================================
=====================================================
-----> starting rest server v0.15 for admin@zerotoblockchain-network
=====================================================
Discovering types from business network definition ...
Connection fails: Error: Card not found: admin@zerotoblockchain-network
It will be retried for the next request.
Exception: Error: Card not found: admin@zerotoblockchain-network
{ Error: Card not found: admin@zerotoblockchain-network
at store.get.then.catch (/usr/local/lib/node_modules/composer-rest-server/node_modules/composer-common/lib/cardstore/walletbackedcardstore.js:74:27)
at
This script indicates that the setup_OSX.sh script was not run successfully on your system prior to starting into the tutorial. Open a terminal window and change to the ZeroToBlockchain folder and run the following command:
./setup_OSX.sh -g false
this will rerun a complete install, except for github desktop. Please let me know if you encounter any errors running this script. If you do, we'll have to do some cleanup on you system and then rerun the script.
Hello, I run it with the root but got into an infinite loop
gyp WARN EACCES user "root" does not have permission to access the dev dir "/var/root/.node-gyp/8.11.1" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/composer-cli/node_modules/pkcs11js/.node-gyp"
After that I run it again without root but received back a few errors about some parts not being installed.
running with root is both unnecessary and creates problems. You will need to do some cleanup on your system. start by running the following commands in the order shown here; these will remove any installations of CLI currently on your system:
npm uninstall -g composer-cli
npm uninstall -g generator-hyperledger-composer
npm uninstall -g composer-rest-server
npm uninstall -g jsdoc
Now you need to remove any versions of node currently installed on your system by brew:
brew uninstall node@6
brew uninstall node@8
brew uninstall node
Next, using a Terminal window execute the following commands:
sudo rm -rf /usr/local/bin/npm
sudo rm -rf /usr/local/bin/node
sudo rm -rf /usr/local/lib/node
sudo rm -rf /usr/local/include/node
sudo rm -rf /usr/local/include/node_modules
rm -rf ~/.npm
rm -rf ~/.node-gyp
Not all of these commands will necessarily remove something, but we need to run all of them to clean up your system.
Next, run the following, but do NOT use sudo
./setup_OSX.sh -g false
When I tried to run the 4th command I am receiving an error with missing write access. That is probably why in past I was trying to use root.
Pavols-MacBook-Pro:~ Pavol$ npm uninstall -g jsdoc npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/babylon npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/bluebird npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/escape-string-regexp npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/graceful-fs npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/klaw npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/marked npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/minimist npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/mkdirp npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/requizzle/node_modules/underscore npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/requizzle npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/strip-json-comments npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/taffydb npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/underscore npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/underscore-contrib/node_modules/underscore npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/underscore-contrib npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/catharsis npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/xmlcreate npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/js2xmlparser npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/requizzle/node_modules npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/jsdoc/node_modules/underscore-contrib/node_modules npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! path /usr/local/lib/node_modules/jsdoc/node_modules/babylon npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/jsdoc/node_modules/babylon' npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/jsdoc/node_modules/babylon' npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/jsdoc/node_modules/babylon\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules/jsdoc/node_modules/babylon' } npm ERR! npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in: npm ERR! /Users/Pavol/.npm/_logs/2018-04-18T19_21_04_807Z-debug.log
I run the npm uninstall -g jsdoc with sudo and follow all the instructions. It seems installing JSdoc is causing the problem because of missing write access. Do you think there is a way how to install it?
installation script for the Zero To Blockchain Series
This is for Mac OSX ONLY
This script will check to see if HomeBrew is installed
and install it if it's not already present.
It will then execute a brew update and brew upgrade to ensure
that you are at the latest release of your brew installed packages
dos2unix is installed by brew to correct scripts from hyperledger and composer
The exec will proceed with checking to ensure you are at Node V8
which is required for working with HyperLedger Composer
The script will then install the nodejs SDK for hyperledger and composer
The script will finish by downloading the docker images for hyperledger
-----> getting current directory
=====================================================
-----> Running 'setup_OSX.sh'
=====================================================
=====================================================
-----> installing xCode command line tools
=====================================================
-----> checking Brew
=====================================================
-----> brew already installed
=====================================================
=====================================================
-----> updating brew to latest version
=====================================================
-----> upgrading your installed brew packages
=====================================================
brew reinstall dos2unix
-----> checking git
=====================================================
=====================================================
-----> skipping git install
=====================================================
=====================================================
-----> checking nodejs
=====================================================
-----> found node 0 installed, but not V8. installing Node V8
=====================================================
==> Downloading https://homebrew.bintray.com/bottles/node@8-8.11.1.high_sierra.bottle.tar.gz Already downloaded: /Users/pavol/Library/Caches/Homebrew/node@8-8.11.1.high_sierra.bottle.tar.gz ==> Pouring node@8-8.11.1.high_sierra.bottle.tar.gz ==> Caveats This formula is keg-only, which means it was not symlinked into /usr/local, because this is an alternate version of another formula.
If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/node@8/bin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/node@8/lib CPPFLAGS: -I/usr/local/opt/node@8/include
-----> installing jsdoc globally
=====================================================
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! path /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules' } npm ERR! npm ERR! Please try running this command again as root/Administrator.
-----> installing node-gyp globally
=====================================================
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/node-gyp npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! path /usr/local/lib/node_modules/node-gyp npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/node-gyp' npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/node-gyp' npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/node-gyp\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules/node-gyp' } npm ERR! npm ERR! Please try running this command again as root/Administrator.
-----> installing nodejs SDK for hyperledger composer
=====================================================
=====================================================
-----> The composer-cli contains all the command line operations for developing business networks.
=====================================================
up to date in 0.045s 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 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 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 npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! path /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules' } npm ERR! npm ERR! Please try running this command again as root/Administrator.
-----> The generator-hyperledger-composer is a Yeoman plugin that creates bespoke applications for your business network.
=====================================================
up to date in 0.044s 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 npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! path /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules' } npm ERR! npm ERR! Please try running this command again as root/Administrator.
-----> The composer-rest-server uses the Hyperledger Composer LoopBack Connector to connect to a business network, extract the models and then present a page containing the REST APIs that have been generated for the model.
=====================================================
up to date in 0.043s 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 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 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 npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! path /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules' } npm ERR! npm ERR! Please try running this command again as root/Administrator.
-----> Yeoman is a tool for generating applications. When combined with the generator-hyperledger-composer component, it can interpret business networks and generate applications based on them.
=====================================================
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/yo npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! path /usr/local/lib/node_modules/yo npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/yo' npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/yo' npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/yo\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules/yo' } npm ERR! npm ERR! Please try running this command again as root/Administrator.
-----> installing hyperledger docker images
=====================================================
-----> removing /Users/pavol/fabric-tools
=====================================================
=====================================================
-----> removing .composer
=====================================================
=====================================================
-----> creating hlf tools folder /Users/pavol/fabric-tools
=====================================================
-----> retrieving image scripts from git
=====================================================
-----> unzipping images
=====================================================
-----> making scripts executable
=====================================================
-----> getting docker images for HyperLedger Fabric V1
=====================================================
Development only script for Hyperledger Fabric control Running 'downloadFabric.sh' FABRIC_VERSION is set to 'hlfv1' FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
ARCH=uname -m
uname -m
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd dirname "${BASH_SOURCE[0]}"
-----> installing platform specific binaries for OSX
=====================================================
-----> updating .bash_profile with new paths
=====================================================
=====================================================
-----> copying peeradmin key to .hfc-key-store
=====================================================
-----> installation complete
The following section in your listing tells you that you were unsuccessful in removing node from your system:
=====================================================
-----> found node 0 installed, but not V8. installing Node V8
=====================================================
==> Downloading https://homebrew.bintray.com/bottles/node@8-8.11.1.high_sierra.bottle.tar.gz
Already downloaded: /Users/pavol/Library/Caches/Homebrew/node@8-8.11.1.high_sierra.bottle.tar.gz
==> Pouring node@8-8.11.1.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/node@8/bin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/node@8/lib
CPPFLAGS: -I/usr/local/opt/node@8/include
As a result, the install is guaranteed to fail. If you type in: which node
and press enter, I expect that your system will respond with something like /usr/local/bin
you must remove that file and the associated folders before you can get npm and nodejs to work on your system. you will need to use sudo to remove it. The same is true with npm.
Dear Bob, thank you for your patience. I am already trying it on second laptop with no success. This time when I re-run the very first curl script in terminal I am receiving this:
brew reinstall node@8
-----> installing jsdoc globally
=====================================================
-----> installing node-gyp globally
=====================================================
-----> installing nodejs SDK for hyperledger composer
=====================================================
=====================================================
-----> The composer-cli contains all the command line operations for developing business networks.
=====================================================
-----> The generator-hyperledger-composer is a Yeoman plugin that creates bespoke applications for your business network.
=====================================================
-----> The composer-rest-server uses the Hyperledger Composer LoopBack Connector to connect to a business network, extract the models and then present a page containing the REST APIs that have been generated for the model.
=====================================================
-----> Yeoman is a tool for generating applications. When combined with the generator-hyperledger-composer component, it can interpret business networks and generate applications based on them.
=====================================================
-----> installing hyperledger docker images
=====================================================
-----> removing /Users/pavollim/fabric-tools
=====================================================
=====================================================
-----> creating hlf tools folder /Users/pavollim/fabric-tools
=====================================================
-----> retrieving image scripts from git
=====================================================
-----> unzipping images
When I try to run buildAndDeploy I am getting this. It seems in both cases there is some problem with NPM. Honestly, I really just followed the instructions on both laptops, one is running on high sierra and one on el capitan
-----> creating archive
=====================================================
-----> starting network
=====================================================
=====================================================
-----> using execs from previous installation, stored in
=====================================================
=====================================================
-----> starting fabric
=====================================================
-----> creating new PeerAdmin card (required with each restart)
=====================================================
-----> start up complete
=====================================================
=====================================================
-----> deploying network
=====================================================
=====================================================
-----> option passed for network name is: 'zerotoblockchain-network'
=====================================================
network deploy script for the Zero To Blockchain Series
This has been successfully tested on OSX Sierra and Ubuntu 16.04
This script will create your Composer archive
-----> deploying network
=====================================================
=====================================================
-----> installing PeerAdmin card
=====================================================
-----> starting network
=====================================================
-----> importing networkadmin card
=====================================================
-----> pinging admin@zerotoblockchain-network card
=====================================================
-----> starting REST server
=====================================================
network archive, start and deploy script for the Zero To Blockchain Series
This has been tested on Mac OSX thru High Sierra and Ubuntu V16 LTS
This script will create your Composer archive
-----> testing rest server
when this completes,
go to your favorite browser
and enter localhost:3000/explorer
=====================================================
=====================================================
-----> starting rest server v0.15 for admin@zerotoblockchain-network
=====================================================
./start_rest_server.sh: line 86: composer-rest-server: command not found Pavols-MacBook-Pro-2:chapter03 pavollim$
The error is not with the tutorial, but with nodejs. If you have ever installed nodejs usingsudo, that's probably the root cause. In any case, I recommend that you follow the following steps to remove nodejs from your system and then restart the process.
npm uninstall -g composer-cli
npm uninstall -g generator-hyperledger-composer
npm uninstall -g composer-rest-server
brew uninstall node@8
brew uninstall node
which node
- this command should just come back with a new prompt. If it comes back with something like
- /usr/local/opt/node@9/bin/node
- then you still have a version of node installed on your system which must be removed before you proceed. To do that:
- To completely uninstall node + npm is to do the following:
- go to /usr/local/lib and delete any node and node_modules.
- go to /usr/local/include and delete any node and node_modules directory.
brew install node@8
npm install -g jsdoc
Do NOT, under any circumstances, execute the brew install, npm install, or setup commands with sudo. If sudo is required during the installation process, it is invoked only for those specific commands for which it is required.
Perhaps I could help you. Try this site and install all prerequisites as it is in manual: https://hyperledger.github.io/composer/latest/installing/development-tools.html
Your initial problem may be caused by version of composer you are using. The tutorial is done in version 0.16. I have version 0.19.5. Those 2 versions aren't working together. What I have done, I've updated devDependencies in package.json so it could fit to my version of composer. Also i set fabric version to hlfv11
"devDependencies": { "extend": "", "browserfs": "^1.2.0", "chai": "latest", "chai-as-promised": "latest", "composer-connector-embedded": "^0.19.5", "composer-cucumber-steps": "^0.19.5", "composer-admin": "^0.19.5", "composer-client": "^0.19.5", "composer-common": "^0.19.5", "composer-runtime": "^0.19.5", "composer-runtime-hlfv1": "^0.19.5", "cucumber": "^2.2.0", "eslint": "latest", "istanbul": "^0.4.5", "jsdoc": "^3.5", "license-check": "^1.1.5", "mkdirp": "latest", "mocha": "latest", "moment": "^2.17.1", "nyc": "latest" }
and to the terminal put "export FABRIC_VERSION=hlfv11" before you will start the netvork
Following the guide and running into an error when running the command curl -H 'Accept: application/vnd.github.v3.raw' https://raw.githubusercontent.com/rddill-IBM/ZeroToBlockchain/master/setup_Ubuntu_Part_2.sh | bash
............. .............. Running 'createPeerAdminCard.sh' FABRIC_VERSION is set to 'hlfv1' FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
Need to have composer-cli installed at version 0.16 [sudo] password for rajiv: chmod: cannot access '/home/rajiv/.composer': No such file or directory
Subsequently when running buildAndDeploy, it cannot find composer
Please ignore the above. Python was needed.
Hi i did try to uninstall Node at all, have the same error. but when i try to reinstall it i got this. how can i search for all node remains on OSX
brew install node@8 ==> Downloading https://homebrew.bintray.com/bottles/node@8-8.12.0.high_sierra.b Already downloaded: /Users/moncho/Library/Caches/Homebrew/downloads/36b322ffc3ae4ced7164f35804da1e3a6b17b8aea2a094b13f39a61123895542--node@8-8.12.0.high_sierra.bottle.1.tar.gz ==> Pouring node@8-8.12.0.high_sierra.bottle.1.tar.gz ==> Caveats node@8 is keg-only, which means it was not symlinked into /usr/local, because this is an alternate version of another formula.
If you need to have node@8 first in your PATH run: echo 'export PATH="/usr/local/opt/node@8/bin:$PATH"' >> ~/.bash_profile
For compilers to find node@8 you may need to set: export LDFLAGS="-L/usr/local/opt/node@8/lib" export CPPFLAGS="-I/usr/local/opt/node@8/include"
==> Summary 🍺 /usr/local/Cellar/node@8/8.12.0: 3,455 files, 44.4MB Ramons-MBP:chapter03 moncho$
Hello, In Chapter 3, when I execute "./buildAndDeploy ", and got this error message. Could you help me to fix this issue ?
userName: PeerAdmin description:
businessNetworkName: roles:
Command succeeded
Parameters: Network Name is: zerotoblockchain-network
✖ Installing runtime for business network zerotoblockchain-network. This may take a minute... Error: Error trying install composer runtime. Error: No valid responses from any peers. Response from attempted peer comms was an error: Error: Endpoint read failed
Command failed
Starting business network from archive: zerotoblockchain-network.bna Business network definition: Identifier: zerotoblockchain-network@0.1.5 Description: Zero to Blockchain tutorial network
Processing these Network Admins: userName: admin
✖ Starting business network definition. This may take a minute... Error: Error trying to instantiate composer runtime. Error: Error: SERVICE_UNAVAILABLE Command failed
Deleted Business Network Card: admin@zerotoblockchain-network
Command succeeded
Successfully imported business network card Card file: networkadmin.card Card name: admin@zerotoblockchain-network
Command succeeded
Error: Error trying login and get user Context. Error: Error trying to enroll user or load channel configuration. Error: Error: SERVICE_UNAVAILABLE Command failed
Parameters: Network Name is: zerotoblockchain-network
Discovering types from business network definition ... Connection fails: Error: Error trying to ping. Error: Error trying to query business network. Error: Endpoint read failed It will be retried for the next request. Exception: Error: Error trying to ping. Error: Error trying to query business network. Error: Endpoint read failed Error: Error trying to ping. Error: Error trying to query business network. Error: Endpoint read failed at _checkRuntimeVersions.then.catch (/root/.nvm/versions/node/v8.11.1/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:713:34) at