Reputation: 178
I'm trying to run fabcar sample. But at the step of run a command which is node enrollAdmin.js
an error occurs like below;
/home/<username>/fabric-samples/fabcar/node_modules/fabric-client/lib/Client.js:742
async _createOrUpdateChannel(request, have_envelope) {
^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/<username>/fabric-samples/fabcar/node_modules/fabric-client/index.js:25:18)
I have checked the file which is error occurred. I find line 742 but I couldn't see syntax error.
Upvotes: 3
Views: 925
Reputation: 848
It is stated in the Hyperleder fabric Pre-Requisites that the only node version 8.9.X is supported. https://hyperledger-fabric.readthedocs.io/en/release-1.2/prereqs.html
Would advise you to upgrade the node version. Use this link to upgrade the node version: Upgrading Node.js to latest version
Upvotes: 1
Reputation: 45
Had the same error, it works after i updated to Node v8.9.4.
npm rebuild and run
Upvotes: 1