I've been following the Hyperledger Composer tutorial. I managed to install Ubuntu 16.04 on Hyper-V on my Windows 10 Enterprise. I then started on the following pre-req installation instructions: https://hyperledger.github.io/composer/installing/installing-prereqs.html
I ran the prereqs-ubuntu.sh script. It ran fine with no errors. I examined the logs and saw that it had successfully installed npm 5.6.0, node 8.9.4, docker 17.12.x, docker composer 1.13.x, and Python 2.7.12.
However, when I run run $ sudo npm --version it tells me that the npm command is not found
Same with $ sudo node --version Not found...?!
Why would that be when the log clearly shows that npm and node where successfuly installed?!
I think you need to log out and close the shell. And then restart with the new session, as the shell stores your session.
Also, after installation, the use of
sudo
is not recommended as mentioned on IBM hyperledger website.Well, what I did and managed through:
--> install nodejs and npm:
so you get the latest node8.
--> then to solve "sudo" problem with node specify the npm prefix:
add the following to .bash_profile
Now the packages will install into your user directory and no permissions will be harmend.
--> install nvm (to get exactly node 8.9 version on the next step):
or
Verify:
which should output 'nvm' if the installation was successful.
--> get and set node 8.9 version:
--> reset PATHs:
--> at this stage the docker previous setup shall be destroyed:
--> Installing the rest of prereqs:
--> now you can install Fabric dev. env. (assuming the rest of prereq components stand available):
etc.