Hyperledger composer CLI installation issues on Ubuntu - amazon-ec2

I installed composer on AWS ubuntu instance with this command:
npm i -g #composer-cli#0.19
On running this command for checking the installation: composer --help
I got this error
composer command not found

What version of npm are you using? Composer only officially supports npm v5.x and node v8.9.x. In particular, make sure you are not running npm v6 or any higher versions of node, eg node v9 or node v10.

If you see this Link for the installation of the development environment the command for composer installation is:
npm install -g composer-cli#0.19
but you are using
npm i -g #composer-cli#0.19
follow the instructions provided in above link, it will work perfectly fine.

Related

On running in Ubuntu 16.04 ./createPeerAdminCard.sh it fails

composer-cli v0.19.2 was successfully installed still on running this error occurs.
Development only script for Hyperledger Fabric control
Running 'createPeerAdminCard.sh'
FABRIC_VERSION is unset, assuming hlfv11
FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
No version of composer-cli has been detected, you need to install composer-cli at v0.19 or higher
The problem is that if you install composer using root or sudo then it is not available to non-root users.
The pre-reqs doc for Composer warns not to use root or sudo, but the warning is actually missing in the install doc itself.
I would recommend uninstalling composer-cli (and playground, rest-server etc) with a command like sudo npm uninstall -g composer-cli then re-install without using sudo. If you have permission problems with npm install there are some notes in the composer knowledge wiki.

Error:Unable to install composer-cli

When I run npm install -g composer-cli I get this error:
"Need to have composer-cli installed at v0.15 or greater".
How can I resolve that?
Try running the command with --unsafe-perms , like this:
sudo npm install --unsafe-perm -g composer-cli
Reference: https://github.com/nodejs/node-gyp/issues/454
On Ubuntu (the supported Linux development environment) we do not recommend using sudo to install Composer.
The usual reason people would resort to sudo is a permission problem, but it is better to resolve the permission problem rather than use sudo. Often the problem is the npm prefix which can get set to /usr/local to which the user doesn't have write access. Issuing an npm config set prefix /home/<myuser>/ will solve the problem.
You may have an old version of Composer or one of the components installed. Try using npm ls -g --depth=0 to see if you have some composer code already installed, and if so remove it with npm uninstall -g composer-<component> where might be cli, or playground etc. The retry the install-g command.
Try this....this is the command to install 0.20 version.
npm install -g composer-cli#0.20
I changed my node version from
11
to
8.8.15
and did npm install -g composer-cli.It worked for me .
You need to use a 8.* node version,
My solution was:
nvm install 8.9.0
nvm use 8.9.0
npm install -g composer-cli

Install Ionic Cordova Error

I am trying to install Ionic 2 on a OSx machine. I did install Node.js. When I run the following:
$ npm install -g ionic cordova
I get this error:
If anyone can assist, I would appreciate it.
UPDATE:
Downgraded Node to v6.9.1 and still get the same error:
UPDATE
As suggested below, I tried:
npm cache clean
But still get the same error:
UPDATE
If I try install a specific version, I get the following error:
sudo npm install -g ionic#2.0.0-beta.20 cordova
to install ionic in mac
you have to install nodejs .
to install ionic as per the official doc if you are using linux or mac you should use sudo command
try
sudo npm install -g ionic cordova
note
your npm version should be greater then 3.x
that version of node its the current so maybe its nos stable at all. I recommend to instal NVM (node version manager) from here this is like a "sand-box" where you have all node version you want and can switch between them.
You only need to run nvm install 5.11.0 and nvm will download that node version for you. Then to use a specific node version you need to run nvm use 5.11.0 and thats all.
I recommend to install 5.11.0 for example, its the node version that im using atm and its working fine with ionic2 RC3.
After downgrading your node.js clean npm cache.
npm cache clean
and try the installation again

Command error running installed npm modules

Hi guys could you help me? i've installed the latest version of node.js and installed cordova and ionic framework the problem starts is when i'm trying to run the ionic command, the console throw me the following message:
MacBook-Pro-de-Diego:~ diegochavez$ ionic start myApp
-bash: ionic: command not found
So then i looked for the root of my npm modules
MacBook-Pro-de-Diego:~ diegochavez$ npm root
/Users/diegochavez/node_modules
if you guys know something to fix this? Thanks in advance
First check if ionic is installed at path like /usr/local/lib/node_modules/ionic/bin/ionic. If it is there, you need to check the npm default global path.
Run command npm config get prefix to check the default path, it should be /usr/local. If it is not /usr/local, run command npm config set prefix /usr/local to set it. And then install again. Also see this answer
I having issue while running - sudo npm install -g gulp ionic with below version of node installed
node -v v0.10.15
npm -v 1.3.5
Error went way after I update node to latest version v0.10.26
The error you are getting is because ionic was not installed successfully. Trying updating node and run command as mentioned sudo npm install -g gulp ionic
Check where your npm folder is located. If your npm folder is located in $Home..then type this:
export PATH="$HOME/npm/bin:$PATH"
You need to run sudo npm install -g ionic from the command line.

Installing docpad#6.63 error: No compatible version found: taskgroup#'~3.3.7n'

I'm trying to install docpad and following the guide on: http://docpad.org/docs/install
When I issue the command:
npm install -g docpad#6.63
I get the following npm error:
npm ERR! Error: No compatible version found: taskgroup#'~3.3.7n'
npm ERR! Valid install targets:
npm ERR! ["2.0.0","3.0.0","3.1.0","3.1.1","3.1.2","3.2.0","3.2.2","3.2.3","3.2.4","3.3.0","3.3.1","3.3.2","3.3.3","3.3.4","3.3.5","3.3.6","3.3.7","3.3.8"]
My node version: v0.10.15
My npm version: 1.2.18
I'm running Kubuntu 13.10 with all updates.
I checked if there is an issue reported for this on github, there isn't. Should I report this as an issue or am I doing something wrong?
Same problem here (Kubuntu 13.10).
I sugggest to go back to a previous version of docpad for the moment. On Ubunto/Debian there is another pitfall: some node modules depend on the nodejs executable to be available under node, so you need the additional package nodejs-legacy.
This worked for me:
sudo apt-get install nodejs-legacy
npm install docpad#6.55.6
Bug on DocPad's behalf, that n shouldn't have been there. Now fixed in v6.63.5. Thanks for the report!

Resources