rddill-IBM / ZeroToBlockchain

Tutorial for Zero to Blockchain series
342 stars 924 forks source link

Chapter03 - npm install error #52

Closed fahadmajeed closed 5 years ago

fahadmajeed commented 5 years ago

I have node v10. When i do npm install within Chapter03 folder, i get following errors:

npm WARN prepublish-on-install As of npm@5, prepublish scripts are deprecated. npm WARN prepublish-on-install Use prepare for build steps and prepublishOnly for upload-only. npm WARN prepublish-on-install See the deprecation note in npm help scripts for more information.

zerotoblockchain-network@0.1.6 prepublish /Users/majeefah/Documents/blockchain/ZeroToBlockchain/Chapter03 mkdirp ./network/dist && composer archive create --sourceType dir --sourceName . -a ./network/dist/zerotoblockchain-network.bna

[Symfony\Component\Console\Exception\RuntimeException]
The "--sourceType" option does not exist.

archive [-f|--format FORMAT] [--dir DIR] [--file FILE] [--ignore-filters] [--] [] []

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! zerotoblockchain-network@0.1.6 prepublish: mkdirp ./network/dist && composer archive create --sourceType dir --sourceName . -a ./network/dist/zerotoblockchain-network.bna npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the zerotoblockchain-network@0.1.6 prepublish 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/majeefah/.npm/_logs/2019-03-03T00_17_20_693Z-debug.log

After that when i do ./buidAndDeploy it throws following

===================================================== -----> creating new PeerAdmin card (required with each restart)

Development only script for Hyperledger Fabric control Running 'createPeerAdminCard.sh' FABRIC_VERSION is unset, assuming hlfv12 FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)

Cannot use Composer version 1.8.4 2019-02-11 10:52:10 version of composer with fabric 1.2, v0.20 or higher is required

   -----> copying admin card to ~/.hfc-key-store
   =====================================================

CA_PEM_SOURCE is: /Users/majeefah/Documents/blockchain/ZeroToBlockchain/Chapter03/controller/restapi/features/composer/creds PEER_SOURCE is: /Users/majeefah/.composer/client-data/PeerAdmin@hlfv1/ HFC_KEY_STORE is: /Users/majeefah/.hfc-key-store cp: /Users/majeefah/Documents/blockchain/ZeroToBlockchain/Chapter03/controller/restapi/features/composer/creds/ca.pem: No such file or directory cp: /Users/majeefah/.composer/client-data/PeerAdmin@hlfv1/: No such file or directory cp: directory /Users/majeefah/Documents/blockchain/ZeroToBlockchain/Chapter03/controller/restapi/features/composer/creds does not exist

   -----> Listing current cards
   =====================================================

[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "card" is not defined.

   =====================================================
   -----> 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

Parameters: Network Name is: zerotoblockchain-network

   -----> deploying network
   =====================================================
   =====================================================
   -----> installing PeerAdmin card
   =====================================================

[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "runtime" is not defined.

   =====================================================
   -----> starting network
   =====================================================

[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "network" is not defined.

   =====================================================
   -----> importing networkadmin card
   =====================================================

[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "card" is not defined.

[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "card" is not defined.

   =====================================================
   -----> pinging admin@zerotoblockchain-network card
   =====================================================

[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "network" is not defined.

   =====================================================
   -----> 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

Parameters: Network Name is: zerotoblockchain-network

   -----> testing rest server 
    when this completes, 
     go to your favorite browser 
    and enter localhost:3000/explorer 
   =====================================================
   =====================================================
   -----> starting rest server v0.16 for admin@zerotoblockchain-network
   =====================================================

./start_rest_server.sh: line 86: composer-rest-server: command not found

rddill-IBM commented 5 years ago

Upgrade to at least npm v6 or higher