Re: ERR! 404 Not Found - GET https://registry.npmjs.org/fabric-chaincode-api - Not found #fabric-sdk-node


Matthew White
 

Hello - the module is `fabric-contract-api`  rather than chaincode-api:-)
 
 
Regards, Matthew.
Matthew B White  IBM Blockchain Solutions Architect
 
Email me at WHITEMAT@...
Find me on StackOverflow, and generally at  calanais.me.uk
 
Note: restricted availability for meetings 14:30 to 17:00 UK Tuesday 
IBM United Kingdom Limited, Hursley Park, Winchester, Hampshire, SO21 2JN

"The wrong answers are the ones you go looking for when the right answers stare you in the face"
 
 
 
----- Original message -----
From: "Magno A. Cavalcante" <magnocav@...>
Sent by: fabric@...
To: fabric@...
Cc:
Subject: [EXTERNAL] [Hyperledger Fabric] ERR! 404 Not Found - GET https://registry.npmjs.org/fabric-chaincode-api - Not found #fabric-sdk-node
Date: Mon, May 18, 2020 9:31 PM
 
Hello All!

I wrote my chaincode using Node.js API, and now I'm trying to instantiate.

image: hyperledger/fabric-peer:1.4.5

My package.json has the follow source:
// -------------------
{
    "name": "democontract",
    "version": "1.0.0",
    "description": "Document Contract",
    "main": "index.js",
    "engines": {
"node": ">=8.4.0",
"npm": ">=5.3.0"
    },
    "scripts": {
        "lint": "eslint .",
        "pretest": "npm run lint",
        "start": "fabric-chaincode-node start",
        "mocha": "mocha test --recursive"
    },
    "engine-strict": true,
    "license": "Apache-2.0",
    "private": true,
    "dependencies": {
        "mkdirp": ">=0.5.5",
        "openpgp": "^4.10.0",
        "fabric-chaincode-api": "^1.4.0",
        "fabric-shim": "^1.4.0"
    },
    "devDependencies": {
        "chai": "^4.1.2",
        "chai-as-promised": "^7.1.1",
        "eslint": "^4.19.1",
        "mocha": "^5.2.0",
        "nyc": "^12.0.2",
        "sinon": "^6.0.0",
        "sinon-chai": "^3.2.0"
    }
}
// -------------------

But when I call in CLI container to instantiate the chaincode (democontract):
// -------------------
peer chaincode instantiate -C $CHANNELNAME -n $CHCODENAME -v $CHCODEVERSION -o $ORDERERNAME \
    -c '{"Args":["ContractDocument:instantiate"]}' \
    -P "OR('OrdererMSP.admin','Org1MSP.admin','Org1MSP.peer','Org1MSP.member')" \
    --tls --cafile $ORDERER_TLSCACERT --tlsRootCertFiles $CORE_PEER_TLS_ROOTCERT_FILE
// -------------------

I'm receing the follow ERROR at PEER container, and chaincode failed to instantiate.

I don't know how to get out of this error condition.
Please, may you help me?

// -------------------
[endorser] SimulateProposal -> ERRO 050 [devchannel][bef25398] failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error returned from build: 1 "npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated 
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated 
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/fabric-chaincode-api  - Not found
npm ERR! 404
npm ERR! 404  'fabric-chaincode-api@^1.4.0' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'output'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-05-18T19_31_20_461Z-debug.log
"
error starting container
error starting container
// -------------------

---
Regards,
Magno A. Cavalcante


 
 
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Join fabric@lists.hyperledger.org to automatically receive all group messages.