Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Simple chaincode cant be installed on Fabric 2.4.3 #345

Open
jpsauve opened this issue Jul 8, 2022 · 3 comments
Open

Simple chaincode cant be installed on Fabric 2.4.3 #345

jpsauve opened this issue Jul 8, 2022 · 3 comments

Comments

@jpsauve
Copy link

jpsauve commented Jul 8, 2022

I am using the latest minifab image.
This command fails in the CC install step:
./minifab up -i 2.4.3 -l node -e true
However, when I install my own typescript (javascript) chaincode, everything works fine.
I suppose the vars/chaincode/simple/node example will have to be updated.

Here is the output:

  non-zero return code
  Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Error returned from build: 1 "+ INPUT_DIR=/chaincode/input
  + OUTPUT_DIR=/chaincode/output
  + cp -R /chaincode/input/src/. /chaincode/output
  + cd /chaincode/output
  + '[' -f package-lock.json -o -f npm-shrinkwrap.json ]
  + npm install --production
  npm WARN EBADENGINE Unsupported engine {
  npm WARN EBADENGINE   package: 'fabric-shim@1.4.6',
  npm WARN EBADENGINE   required: { node: '^8.17.0', npm: '^6.13.4' },
  npm WARN EBADENGINE   current: { node: 'v16.14.2', npm: '8.5.0' }
  npm WARN EBADENGINE }
  npm notice 
  npm notice New minor version of npm available! 8.5.0 -> 8.13.2
  npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.13.2>
  npm notice Run `npm install -g npm@8.13.2` to update!
  npm notice 
  npm ERR! code 1
  npm ERR! path /chaincode/output/node_modules/fabric-shim/node_modules/grpc
  npm ERR! command failed
  npm ERR! command sh -c node-gyp rebuild
  npm ERR! gyp info it worked if it ends with ok
  npm ERR! gyp info using node-gyp@8.4.1
  npm ERR! gyp info using node@16.14.2 | linux | x64
  npm ERR! gyp info find Python using Python version 3.9.7 found at "/usr/bin/python3"
  npm ERR! gyp http GET https://unofficial-builds.nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz
  npm ERR! gyp http 200 https://unofficial-builds.nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz
  npm ERR! gyp http GET https://unofficial-builds.nodejs.org/download/release/v16.14.2/SHASUMS256.txt
  npm ERR! gyp http 200 https://unofficial-builds.nodejs.org/download/release/v16.14.2/SHASUMS256.txt
  npm ERR! gyp info spawn /usr/bin/python3
  npm ERR! gyp info spawn args [
  npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
  npm ERR! gyp info spawn args   'binding.gyp',
  npm ERR! gyp info spawn args   '-f',
  npm ERR! gyp info spawn args   'make',
  npm ERR! gyp info spawn args   '-I',
  npm ERR! gyp info spawn args   '/chaincode/output/node_modules/fabric-shim/node_modules/grpc/build/config.gypi',
  npm ERR! gyp info spawn args   '-I',
  npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
  npm ERR! gyp info spawn args   '-I',
  npm ERR! gyp info spawn args   '/root/.cache/node-gyp/16.14.2/include/node/common.gypi',
  npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
  npm ERR! gyp info spawn args   '-Dvisibility=default',
  npm ERR! gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/16.14.2',
  npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
  npm ERR! gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/16.14.2/<(target_arch)/node.lib',
  npm ERR! gyp info spawn args   '-Dmodule_root_dir=/chaincode/output/node_modules/fabric-shim/node_modules/grpc',
  npm ERR! gyp info spawn args   '-Dnode_engine=v8',
  npm ERR! gyp info spawn args   '--depth=.',
  npm ERR! gyp info spawn args   '--no-parallel',
  npm ERR! gyp info spawn args   '--generator-output',
  npm ERR! gyp info spawn args   'build',
  npm ERR! gyp info spawn args   '-Goutput_dir=.'
  npm ERR! gyp info spawn args ]
  npm ERR! gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp
  npm ERR! gyp ERR! configure error 
  npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
  npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:259:16)
  npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:526:28)
  npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
  npm ERR! gyp ERR! System Linux 5.10.104-linuxkit
  npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
  npm ERR! gyp ERR! cwd /chaincode/output/node_modules/fabric-shim/node_modules/grpc
  npm ERR! gyp ERR! node -v v16.14.2
  npm ERR! gyp ERR! node-gyp -v v8.4.1
  npm ERR! gyp ERR! not ok
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /root/.npm/_logs/2022-07-08T12_50_08_894Z-debug-0.log
  "

# STATS *******************************************************
minifab: ok=347 failed=1
@litong01
Copy link
Contributor

litong01 commented Jul 8, 2022 via email

@jpsauve
Copy link
Author

jpsauve commented Jul 8, 2022 via email

@litong01
Copy link
Contributor

litong01 commented Jul 8, 2022 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants