Open jpsauve opened 2 years ago
Probably try using the go chain code to see the results. If go chain code goes well, the problem must be in the chain code. Thanks for trying.
On Jul 8, 2022, at 9:24 AM, Jacques Sauve @.**@.>> wrote:
This Message Is From an External Sender This message came from outside your organization.
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
npm install --production
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: @.',
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.2https://github.com/npm/cli/releases/tag/v8.13.2%3E
npm notice Run `npm install -g @.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 ***@***.*** npm ERR! gyp info using ***@***.*** | 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<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<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<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<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 "
minifab: ok=347 failed=1
— Reply to this email directly, view it on GitHubhttps://github.com/hyperledger-labs/minifabric/issues/345, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAO2NS24B6ZEVY5U3XW34R3VTATZ5ANCNFSM53A7SL3Q. You are receiving this because you are subscribed to this thread.
Hi Tong, As I said, my own chaincode in typescript works fine with minifabric and Fabric 2.4.3. The problem with the "simple" chaincode doesnt affect me. I am just reporting this issue to help the community, to avoid other people having a problem with the "simple" chaincode in the future when using minifabric for the first time. It may be worthwhile to fix the javascript version of "simple" so it installs.
I am still number two minifabric fan (you must be fan number one!)
Jacques
Em sex., 8 de jul. de 2022 às 10:30, Tong Li @.***> escreveu:
Probably try using the go chain code to see the results. If go chain code goes well, the problem must be in the chain code. Thanks for trying.
On Jul 8, 2022, at 9:24 AM, Jacques Sauve @.**@.>> wrote:
This Message Is From an External Sender This message came from outside your organization.
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: @.', 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< https://github.com/npm/cli/releases/tag/v8.13.2%3E> npm notice Run `npm install -g @.` 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 @. npm ERR! gyp info using @. | 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 < 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 < 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 < 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 < 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
— Reply to this email directly, view it on GitHub< https://github.com/hyperledger-labs/minifabric/issues/345>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AAO2NS24B6ZEVY5U3XW34R3VTATZ5ANCNFSM53A7SL3Q>.
You are receiving this because you are subscribed to this thread.
— Reply to this email directly, view it on GitHub https://github.com/hyperledger-labs/minifabric/issues/345#issuecomment-1178991827, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKW64DAWSFRG5GWQM2ACP3VTAUNTANCNFSM53A7SL3Q . You are receiving this because you authored the thread.Message ID: @.***>
Jacques, Very nice. Glad that you think that Minifabric is helpful and to is a fan of it. If you can manage fixing the node chain code (it is probably very old), and have a PR, that will be wonderful.
Thanks.
On Jul 8, 2022, at 9:40 AM, Jacques Sauve @.**@.>> wrote:
This Message Is From an External Sender This message came from outside your organization.
Hi Tong, As I said, my own chaincode in typescript works fine with minifabric and Fabric 2.4.3. The problem with the "simple" chaincode doesnt affect me. I am just reporting this issue to help the community, to avoid other people having a problem with the "simple" chaincode in the future when using minifabric for the first time. It may be worthwhile to fix the javascript version of "simple" so it installs.
I am still number two minifabric fan (you must be fan number one!)
Jacques
Em sex., 8 de jul. de 2022 às 10:30, Tong Li @.***> escreveu:
Probably try using the go chain code to see the results. If go chain code goes well, the problem must be in the chain code. Thanks for trying.
On Jul 8, 2022, at 9:24 AM, Jacques Sauve @.**@.>> wrote:
This Message Is From an External Sender This message came from outside your organization.
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: @.', 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<https://github.com/npm/cli/releases/tag/v8.13.2%3E%3C https://github.com/npm/cli/releases/tag/v8.13.2%3E>https://github.com/npm/cli/releases/tag/v8.13.2%3E%3E npm notice Run `npm install -g @.` 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 @. npm ERR! gyp info using @. | 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.gzhttps://unofficial-builds.nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz < https://unofficial-builds.nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz>https://unofficial-builds.nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz%3E
npm ERR! gyp http 200 https://unofficial-builds.nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gzhttps://unofficial-builds.nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz < https://unofficial-builds.nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz>https://unofficial-builds.nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz%3E
npm ERR! gyp http GET https://unofficial-builds.nodejs.org/download/release/v16.14.2/SHASUMS256.txthttps://unofficial-builds.nodejs.org/download/release/v16.14.2/SHASUMS256.txt < https://unofficial-builds.nodejs.org/download/release/v16.14.2/SHASUMS256.txt>https://unofficial-builds.nodejs.org/download/release/v16.14.2/SHASUMS256.txt%3E
npm ERR! gyp http 200 https://unofficial-builds.nodejs.org/download/release/v16.14.2/SHASUMS256.txthttps://unofficial-builds.nodejs.org/download/release/v16.14.2/SHASUMS256.txt < https://unofficial-builds.nodejs.org/download/release/v16.14.2/SHASUMS256.txt>https://unofficial-builds.nodejs.org/download/release/v16.14.2/SHASUMS256.txt%3E
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
— Reply to this email directly, view it on GitHub< https://github.com/hyperledger-labs/minifabric/issues/345>https://github.com/hyperledger-labs/minifabric/issues/345%3E, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AAO2NS24B6ZEVY5U3XW34R3VTATZ5ANCNFSM53A7SL3Q>https://github.com/notifications/unsubscribe-auth/AAO2NS24B6ZEVY5U3XW34R3VTATZ5ANCNFSM53A7SL3Q%3E.
You are receiving this because you are subscribed to this thread.
— Reply to this email directly, view it on GitHub https://github.com/hyperledger-labs/minifabric/issues/345#issuecomment-1178991827https://github.com/hyperledger-labs/minifabric/issues/345#issuecomment-1178991827%3E, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKW64DAWSFRG5GWQM2ACP3VTAUNTANCNFSM53A7SL3Qhttps://github.com/notifications/unsubscribe-auth/ABKW64DAWSFRG5GWQM2ACP3VTAUNTANCNFSM53A7SL3Q%3E . You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHubhttps://github.com/hyperledger-labs/minifabric/issues/345#issuecomment-1179001944, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAO2NS7OGF5WKICYW4J3VDDVTAVTFANCNFSM53A7SL3Q. You are receiving this because you commented.
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: