The extension requires npm >= 6.x.x, but one of its packages (fabric-shim) requires npm ^5.5.1 #1821
Comments
Workaround here is to manually download unstable version of fabric-shim Not sure though if this workaround could bring me any troubles later on. |
@the-inevitable thanks. worked for me. |
@the-inevitable thanks!! It works for me either |
I also had the problem when completing the IBM Blockchain Platform tutorial. I had the error when I launched the debug in part 7. I tried installing the version of fabric-shim that you recommended, but it started giving me errors on "utf8" in my contract instead. Installing the latest version (2.2.0) will not even fix the fabric-shim not found error. |
Hello, The error is: Starting compilation in watch mode... I also tried installing 'fabric-shim' manually but didn't get sorted things, same error popping up. Please help me with the solution to fix this. Also find the screenshots for your reference. Looking forward for the solution. Can connect with me at manpreetsinghpuri01@gmail.com. Thanks! |
I tried to do that but still the same issue pops up. Can you help me with some other solution? |
FIXED. Had the same problems and the workaround did not help. I suspected that the issues were with the packaging, and yes that was the case. In the
I changed both specifications to |
Thanks! This worked for me. Glad I searched before creating a new issue |
Description
I was going through the IBM Blockchain Platform extension tutorial and got stuck on 3-rd step of 1-st section - "3. Package the smart contract".
Having a directory with smart contract project from steps 1 and 2, I tried to package it, but got an error saying
Cannot find module - 'fabric-shim'
.When I tried to install the module
npm i fabric-shim
, it also exited with an errorUnsupported engine for fabric-shim@1.4.2: wanted: {"node":"^8.9.0","npm":"^5.5.1"} (current: {"node":"10.18.1","npm":"6.13.4"})
I tried installing fabric-shim@1.4.4, but it also requires npm bersion not higher than 5.5.1.
The main question is:
How is it possible, that the extension requires npm version to be higher than 6.x.x, but one of its dependencies only runs with npm version NOT higher than 5.5.1 ?
Expected Behavior
Every step in tutorial should run smoothly.
Actual Behavior
Having a directory with smart contract project from steps 1 and 2, I tried to package it, but got an error saying
Cannot find module - 'fabric-shim'
.When I tried to install the module
npm i fabric-shim
, it also exited with an errorUnsupported engine for fabric-shim@1.4.2: wanted: {"node":"^8.9.0","npm":"^5.5.1"} (current: {"node":"10.18.1","npm":"6.13.4"})
Possible Fix
Adjust dependencies to use correct versions of node and npm
Steps to Reproduce
2.Try to package smart contract
Log File
** when trying to package smart contract **
node_modules/fabric-contract-api/types/index.d.ts:10:51 - error TS2307: Cannot find module 'fabric-shim'.
10 import { ChaincodeStub, ClientIdentity } from 'fabric-shim';
** when trying to manually install the dependency **
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/usr/local/bin/nodejs/node-v10.18.1-linux-x64/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/usr/local/bin/nodejs/node-v10.18.1-linux-x64/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/usr/local/bin/nodejs/node-v10.18.1-linux-x64/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/local/bin/nodejs/node-v10.18.1-linux-x64/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/local/bin/nodejs/node-v10.18.1-linux-x64/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/local/bin/nodejs/node-v10.18.1-linux-x64/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:153:21)
gyp ERR! System Linux 5.0.0-37-generic
gyp ERR! command "/usr/local/bin/nodejs/node-v10.18.1-linux-x64/bin/node" "/usr/local/bin/nodejs/node-v10.18.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vlad-alephone/projects/ezetech-workspace/ibm_blockchain/ore/node_modules/@ampretia/x509
gyp ERR! node -v v10.18.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN notsup Unsupported engine for fabric-shim@1.4.2: wanted: {"node":"^8.9.0","npm":"^5.5.1"} (current: {"node":"10.18.1","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: fabric-shim@1.4.2
npm WARN ore@0.0.1 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ampretia/x509@0.4.7 install:
node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ampretia/x509@0.4.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Your Environment
The text was updated successfully, but these errors were encountered: