hyperledger-archives / education

Hyperledger training material
https://wiki.hyperledger.org/display/LMDWG
Apache License 2.0
372 stars 360 forks source link

Cannot start node registerAdmin.js #16

Open suhasmane02 opened 6 years ago

suhasmane02 commented 6 years ago

running below command from education/LFS171x/fabric-material/tuna-app getting error. node registerAdmin.js

module.js:471 throw err; ^

Error: Cannot find module 'fabric-client' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/home/suhas/Hyperledger_Edu/education/LFS171x/fabric-material/tuna-app/registerAdmin.js:12:21) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)

alexandrag2254 commented 6 years ago

What operating system are you using? Are you using Windows? If so, you may not have all the elements for npm. Try to run "npm install --global windows-build-tools" and then rerun "npm install". Check out: https://www.npmjs.com/package/windows-build-tools.

suhasmane02 commented 6 years ago

Operating System: (Ubuntu 16.04) Linux suses-ubuntu 4.4.0-103-generic #126-Ubuntu SMP Mon Dec 4 16:23:28 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

npm version { npm: '5.6.0', ares: '1.10.1-DEV', http_parser: '2.7.0', icu: '58.2', modules: '48', node: '6.12.0', openssl: '1.0.2m', uv: '1.15.0', v8: '5.1.281.108', zlib: '1.2.11' }

Please let me know, if anything else is needed.

youngnacs commented 6 years ago

I have similar problem and stuck there. Did you have any solution for this issue yet? Can you share it if you found? Thanks.

Carstig commented 6 years ago

I had the same problem (under OS X) and assumed I could skip npm install. That was wrong.

As I was under OSX I had to ensure I was using the right python version. Found this npm config set python /usr/bin/python2.7

Then I ran npm install

hieulinh0709 commented 5 years ago

me too on ubuntu, i need solution, pls

rsrawat90 commented 5 years ago

in the current working Directory use below command

$ npm update $ npm install this works for me I hope this will work or you aswell

ahmedsrady commented 5 years ago

I had the same problem (under OS X) and assumed I could skip npm install. That was wrong.

As I was under OSX I had to ensure I was using the right python version. Found this npm config set python /usr/bin/python2.7

Then I ran npm install

This solution working with me, Thanks