fabirc-shim latest-1.4 support for nodejs v16.x.x
Closed this issue · 1 comments
Hi Team,
When can we expect support for nodejs v16.x.x and npm v8.x.x for the latest 1.4.x version of fabric-shim?
Getting this error while trying to install fabric-shim@1.4.6:
npm ERR! code 1
npm ERR! path C:\Users\PravallikaP\Documents\Syniverse\Workspace\ucs-chaincode\node_modules\fabric-shim\node_modules\grpc
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.1.0
npm ERR! gyp info using node@16.17.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.6 found at "C:\Users\PravallikaP\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe"
npm ERR! gyp info find VS using VS2017 (15.9.28307.1800) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\PravallikaP\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\Users\PravallikaP\AppData\Roaming\npm\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 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\PravallikaP\Documents\Syniverse\Workspace\ucs-chaincode\node_modules\fabric-shim\node_modules\grpc\build\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\PravallikaP\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\PravallikaP\AppData\Local\node-gyp\Cache\16.17.0\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=C:\Users\PravallikaP\AppData\Local\node-gyp\Cache\16.17.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Users\PravallikaP\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\PravallikaP\\AppData\\Local\\node-gyp\\Cache\\16.17.0\\<(target_arch)\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\PravallikaP\Documents\Syniverse\Workspace\ucs-chaincode\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 'C:\Users\PravallikaP\Documents\Syniverse\Workspace\ucs-chaincode\node_modules\fabric-shim\node_modules\grpc\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 (C:\Users\PravallikaP\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:284:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\PravallikaP\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\PravallikaP\Documents\Syniverse\Workspace\ucs-chaincode\node_modules\fabric-shim\node_modules\grpc
npm ERR! gyp ERR! node -v v16.17.0
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\PravallikaP\AppData\Local\npm-cache_logs\2022-09-06T06_27_11_493Z-debug-0.log
@Pravallikaps thanks for taking the time to raise an issue.
The v1.4 versions of all Fabric Components (including chaincode, sdks, peers) are no longer the supported stream.
v2.2 is the official Long Term Support (LTS) version..... though would recommend you go to v2.4.
As far as chaincode/smart contracts are concerned the migration is minimal - plus you get the Node 16 support!