mahajanvv / EHRUsingBlockchain

Electronic Health Records managing using hyperledger fabric composer
13 stars 8 forks source link

Generating a REST server from hyperledger fabric composer #27

Open Mohammed-alzuharey opened 3 years ago

Mohammed-alzuharey commented 3 years ago

Hello everyone Thanks for this perfect project . But when need to generating a REST server (create the REST API) run the command : ubuntu@ubuntu-VirtualBox:~/EHRUsingBlockchain-master/healthcare$ composer-rest-server get this error: /home/ubuntu/.nvm/versions/node/v8.17.0/lib/node_modules/composer-rest-server /node_modules/formdata-node/lib/cjs/Blob.js:80 for await (const chunk of (0, blobHelpers_1.consumeBlobParts)
(__classPrivateFieldGet(this, _Blob_parts, "f"))) { ^^^^^

SyntaxError: Unexpected reserved word at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:617:28) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at Object. (/home/ubuntu/.nvm/versions/node/v8.17.0/lib/node_modules/composer-rest-server/node_modules/formdata-node/lib/cjs/File.js:16:16)

Operating system : I used Ubuntu Linux 16.04 LTS (virtual machine) How i can fix that ... please any one can help me ? Thanks

zyf654321 commented 2 years ago

I've also had the same problem as you. How did you finally solve this problem? Thank you so much

Mohammed-alzuharey commented 2 years ago

Hello @zyf654321 I solved this error by running next commands $ npm i -g composer-rest-server $ cd /home/ali/.nvm/versions/node/v8.17.0/lib/node_modules/composer-rest-server $ npm install swagger-client@3.9.0 $ rm -rf node_modules/g11n-pipeline/node_modules/swagger-client after that it worked correctly

zyf654321 commented 2 years ago

Thank you very much for your help, I successfully solved this problem with your reminder.Best wishes to you!