prereqs-ubuntu.sh and npm install -g
up vote
0
down vote
favorite
I'm closely following the tutorial for installing a development environment in Linux.
1 - I tried to install the prerequisite programs using a non-sudo user and failed because it requires a sudo user to run. Ok, so maybe the prerequisites can be executed in sudo, just not the Composer. So I ran the prerequisites using a sudo user without any issues.
2 - Now I switched to a non-sudo user to run the Composer install. So I did "npm install -g composer-cli" and it failed because npm is not installed. I looked at this reference, https://docs.npmjs.com/getting-started/fixing-npm-permissions. Is this right? Is there a specific option to use. I tried option 2 and it didn't quite work for me.
Thanks!
install ubuntu-16.04 hyperledger-composer
add a comment |
up vote
0
down vote
favorite
I'm closely following the tutorial for installing a development environment in Linux.
1 - I tried to install the prerequisite programs using a non-sudo user and failed because it requires a sudo user to run. Ok, so maybe the prerequisites can be executed in sudo, just not the Composer. So I ran the prerequisites using a sudo user without any issues.
2 - Now I switched to a non-sudo user to run the Composer install. So I did "npm install -g composer-cli" and it failed because npm is not installed. I looked at this reference, https://docs.npmjs.com/getting-started/fixing-npm-permissions. Is this right? Is there a specific option to use. I tried option 2 and it didn't quite work for me.
Thanks!
install ubuntu-16.04 hyperledger-composer
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm closely following the tutorial for installing a development environment in Linux.
1 - I tried to install the prerequisite programs using a non-sudo user and failed because it requires a sudo user to run. Ok, so maybe the prerequisites can be executed in sudo, just not the Composer. So I ran the prerequisites using a sudo user without any issues.
2 - Now I switched to a non-sudo user to run the Composer install. So I did "npm install -g composer-cli" and it failed because npm is not installed. I looked at this reference, https://docs.npmjs.com/getting-started/fixing-npm-permissions. Is this right? Is there a specific option to use. I tried option 2 and it didn't quite work for me.
Thanks!
install ubuntu-16.04 hyperledger-composer
I'm closely following the tutorial for installing a development environment in Linux.
1 - I tried to install the prerequisite programs using a non-sudo user and failed because it requires a sudo user to run. Ok, so maybe the prerequisites can be executed in sudo, just not the Composer. So I ran the prerequisites using a sudo user without any issues.
2 - Now I switched to a non-sudo user to run the Composer install. So I did "npm install -g composer-cli" and it failed because npm is not installed. I looked at this reference, https://docs.npmjs.com/getting-started/fixing-npm-permissions. Is this right? Is there a specific option to use. I tried option 2 and it didn't quite work for me.
Thanks!
install ubuntu-16.04 hyperledger-composer
install ubuntu-16.04 hyperledger-composer
asked Oct 23 '17 at 17:10
rgabo101
1
1
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
did you follow all of the pre-reqs from https://hyperledger.github.io/composer/unstable/installing/development-tools.html ? I only mention, because you wrote and it failed because npm is not installed.
. This would mean you didn't install npm yet (and therefore your question on permissions is an entirely separate question, that may not be an issue once you have npm installed.
In the prereqs-ubuntu.sh script it mentions (after nvm / node install):
*# Configure nvm to use version 6.9.5
nvm use 6.9.5
nvm alias default 6.9.5*
**# Install the latest version of npm
npm install npm@latest -g**
To resolve your particular problem, you would run the last line.
Only use sudo where instructed in the pre-reqs-ubuntu.sh script. To re-iterate - do not install Hyperledger Composer packages - with sudo. It will cause problems, for npm (when using it for installs) and won't install properly.
add a comment |
up vote
0
down vote
Well, what I did and managed through:
--> install nodejs and npm:
sudo snap install node --classic --channel=8
so you get the latest node8.
--> then to solve "sudo" problem with node specify the npm prefix:
npm config set prefix ~/.node_modules
add the following to .bash_profile
export PATH=$HOME/.node_modules/bin:$PATH
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):
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
or
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
Verify:
node -v nvm
which should output 'nvm' if the installation was successful.
--> get and set node 8.9 version:
nvm install v8.9.0
nvm use 8.9.0
--> reset PATHes:
echo export PATH="$HOME/npm/b
in:$PATH" >> ~/.bashrc
npm config set prefix ~/npm
echo "export NODE_PATH=$NODE_PATH:/home/$USER/npm/lib/node_modules" >> ~/.bashrc && source ~/.bashrc
--> reset PATHs:
echo export PATH="$HOME/npm/bin:$PATH" >> ~/.bashrc
npm config set prefix ~/npm
echo "export NODE_PATH=$NODE_PATH:/home/$USER/npm/lib/node_modules" >> ~/.bashrc && source ~/.bashrc
--> at this stage the docker previous setup shall be destroyed:
docker kill $(docker ps -q)
docker rm $(docker ps -aq)
docker rmi $(docker images dev-* -q)
--> now you can install Fabric dev. env. (assuming the rest of prereq components stand available (Docker, Docker Compose, Python, git)):
npm install -g composer-cli
etc.
New contributor
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
did you follow all of the pre-reqs from https://hyperledger.github.io/composer/unstable/installing/development-tools.html ? I only mention, because you wrote and it failed because npm is not installed.
. This would mean you didn't install npm yet (and therefore your question on permissions is an entirely separate question, that may not be an issue once you have npm installed.
In the prereqs-ubuntu.sh script it mentions (after nvm / node install):
*# Configure nvm to use version 6.9.5
nvm use 6.9.5
nvm alias default 6.9.5*
**# Install the latest version of npm
npm install npm@latest -g**
To resolve your particular problem, you would run the last line.
Only use sudo where instructed in the pre-reqs-ubuntu.sh script. To re-iterate - do not install Hyperledger Composer packages - with sudo. It will cause problems, for npm (when using it for installs) and won't install properly.
add a comment |
up vote
0
down vote
did you follow all of the pre-reqs from https://hyperledger.github.io/composer/unstable/installing/development-tools.html ? I only mention, because you wrote and it failed because npm is not installed.
. This would mean you didn't install npm yet (and therefore your question on permissions is an entirely separate question, that may not be an issue once you have npm installed.
In the prereqs-ubuntu.sh script it mentions (after nvm / node install):
*# Configure nvm to use version 6.9.5
nvm use 6.9.5
nvm alias default 6.9.5*
**# Install the latest version of npm
npm install npm@latest -g**
To resolve your particular problem, you would run the last line.
Only use sudo where instructed in the pre-reqs-ubuntu.sh script. To re-iterate - do not install Hyperledger Composer packages - with sudo. It will cause problems, for npm (when using it for installs) and won't install properly.
add a comment |
up vote
0
down vote
up vote
0
down vote
did you follow all of the pre-reqs from https://hyperledger.github.io/composer/unstable/installing/development-tools.html ? I only mention, because you wrote and it failed because npm is not installed.
. This would mean you didn't install npm yet (and therefore your question on permissions is an entirely separate question, that may not be an issue once you have npm installed.
In the prereqs-ubuntu.sh script it mentions (after nvm / node install):
*# Configure nvm to use version 6.9.5
nvm use 6.9.5
nvm alias default 6.9.5*
**# Install the latest version of npm
npm install npm@latest -g**
To resolve your particular problem, you would run the last line.
Only use sudo where instructed in the pre-reqs-ubuntu.sh script. To re-iterate - do not install Hyperledger Composer packages - with sudo. It will cause problems, for npm (when using it for installs) and won't install properly.
did you follow all of the pre-reqs from https://hyperledger.github.io/composer/unstable/installing/development-tools.html ? I only mention, because you wrote and it failed because npm is not installed.
. This would mean you didn't install npm yet (and therefore your question on permissions is an entirely separate question, that may not be an issue once you have npm installed.
In the prereqs-ubuntu.sh script it mentions (after nvm / node install):
*# Configure nvm to use version 6.9.5
nvm use 6.9.5
nvm alias default 6.9.5*
**# Install the latest version of npm
npm install npm@latest -g**
To resolve your particular problem, you would run the last line.
Only use sudo where instructed in the pre-reqs-ubuntu.sh script. To re-iterate - do not install Hyperledger Composer packages - with sudo. It will cause problems, for npm (when using it for installs) and won't install properly.
answered Oct 24 '17 at 12:27
Paul O'Mahony
5,4881412
5,4881412
add a comment |
add a comment |
up vote
0
down vote
Well, what I did and managed through:
--> install nodejs and npm:
sudo snap install node --classic --channel=8
so you get the latest node8.
--> then to solve "sudo" problem with node specify the npm prefix:
npm config set prefix ~/.node_modules
add the following to .bash_profile
export PATH=$HOME/.node_modules/bin:$PATH
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):
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
or
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
Verify:
node -v nvm
which should output 'nvm' if the installation was successful.
--> get and set node 8.9 version:
nvm install v8.9.0
nvm use 8.9.0
--> reset PATHes:
echo export PATH="$HOME/npm/b
in:$PATH" >> ~/.bashrc
npm config set prefix ~/npm
echo "export NODE_PATH=$NODE_PATH:/home/$USER/npm/lib/node_modules" >> ~/.bashrc && source ~/.bashrc
--> reset PATHs:
echo export PATH="$HOME/npm/bin:$PATH" >> ~/.bashrc
npm config set prefix ~/npm
echo "export NODE_PATH=$NODE_PATH:/home/$USER/npm/lib/node_modules" >> ~/.bashrc && source ~/.bashrc
--> at this stage the docker previous setup shall be destroyed:
docker kill $(docker ps -q)
docker rm $(docker ps -aq)
docker rmi $(docker images dev-* -q)
--> now you can install Fabric dev. env. (assuming the rest of prereq components stand available (Docker, Docker Compose, Python, git)):
npm install -g composer-cli
etc.
New contributor
add a comment |
up vote
0
down vote
Well, what I did and managed through:
--> install nodejs and npm:
sudo snap install node --classic --channel=8
so you get the latest node8.
--> then to solve "sudo" problem with node specify the npm prefix:
npm config set prefix ~/.node_modules
add the following to .bash_profile
export PATH=$HOME/.node_modules/bin:$PATH
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):
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
or
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
Verify:
node -v nvm
which should output 'nvm' if the installation was successful.
--> get and set node 8.9 version:
nvm install v8.9.0
nvm use 8.9.0
--> reset PATHes:
echo export PATH="$HOME/npm/b
in:$PATH" >> ~/.bashrc
npm config set prefix ~/npm
echo "export NODE_PATH=$NODE_PATH:/home/$USER/npm/lib/node_modules" >> ~/.bashrc && source ~/.bashrc
--> reset PATHs:
echo export PATH="$HOME/npm/bin:$PATH" >> ~/.bashrc
npm config set prefix ~/npm
echo "export NODE_PATH=$NODE_PATH:/home/$USER/npm/lib/node_modules" >> ~/.bashrc && source ~/.bashrc
--> at this stage the docker previous setup shall be destroyed:
docker kill $(docker ps -q)
docker rm $(docker ps -aq)
docker rmi $(docker images dev-* -q)
--> now you can install Fabric dev. env. (assuming the rest of prereq components stand available (Docker, Docker Compose, Python, git)):
npm install -g composer-cli
etc.
New contributor
add a comment |
up vote
0
down vote
up vote
0
down vote
Well, what I did and managed through:
--> install nodejs and npm:
sudo snap install node --classic --channel=8
so you get the latest node8.
--> then to solve "sudo" problem with node specify the npm prefix:
npm config set prefix ~/.node_modules
add the following to .bash_profile
export PATH=$HOME/.node_modules/bin:$PATH
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):
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
or
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
Verify:
node -v nvm
which should output 'nvm' if the installation was successful.
--> get and set node 8.9 version:
nvm install v8.9.0
nvm use 8.9.0
--> reset PATHes:
echo export PATH="$HOME/npm/b
in:$PATH" >> ~/.bashrc
npm config set prefix ~/npm
echo "export NODE_PATH=$NODE_PATH:/home/$USER/npm/lib/node_modules" >> ~/.bashrc && source ~/.bashrc
--> reset PATHs:
echo export PATH="$HOME/npm/bin:$PATH" >> ~/.bashrc
npm config set prefix ~/npm
echo "export NODE_PATH=$NODE_PATH:/home/$USER/npm/lib/node_modules" >> ~/.bashrc && source ~/.bashrc
--> at this stage the docker previous setup shall be destroyed:
docker kill $(docker ps -q)
docker rm $(docker ps -aq)
docker rmi $(docker images dev-* -q)
--> now you can install Fabric dev. env. (assuming the rest of prereq components stand available (Docker, Docker Compose, Python, git)):
npm install -g composer-cli
etc.
New contributor
Well, what I did and managed through:
--> install nodejs and npm:
sudo snap install node --classic --channel=8
so you get the latest node8.
--> then to solve "sudo" problem with node specify the npm prefix:
npm config set prefix ~/.node_modules
add the following to .bash_profile
export PATH=$HOME/.node_modules/bin:$PATH
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):
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
or
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
Verify:
node -v nvm
which should output 'nvm' if the installation was successful.
--> get and set node 8.9 version:
nvm install v8.9.0
nvm use 8.9.0
--> reset PATHes:
echo export PATH="$HOME/npm/b
in:$PATH" >> ~/.bashrc
npm config set prefix ~/npm
echo "export NODE_PATH=$NODE_PATH:/home/$USER/npm/lib/node_modules" >> ~/.bashrc && source ~/.bashrc
--> reset PATHs:
echo export PATH="$HOME/npm/bin:$PATH" >> ~/.bashrc
npm config set prefix ~/npm
echo "export NODE_PATH=$NODE_PATH:/home/$USER/npm/lib/node_modules" >> ~/.bashrc && source ~/.bashrc
--> at this stage the docker previous setup shall be destroyed:
docker kill $(docker ps -q)
docker rm $(docker ps -aq)
docker rmi $(docker images dev-* -q)
--> now you can install Fabric dev. env. (assuming the rest of prereq components stand available (Docker, Docker Compose, Python, git)):
npm install -g composer-cli
etc.
New contributor
edited Nov 10 at 12:12
New contributor
answered Nov 10 at 9:28
xao leskii
112
112
New contributor
New contributor
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46894892%2fprereqs-ubuntu-sh-and-npm-install-g%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password