error occurred on running composer playground - hyperledger-composer

I had installed my business network and then successfully started it. Then I opened my composer playground from the command line. After opening it is showing the below message what should I do?

This looks like you have installed composer-playground as root or using sudo or su.
The composer install instructions state that you should not use su/sudo.
There is additional information about installing composer in the Knowledge wiki, but if you are having permissions problems trying to install without root/su/sudo please see this link from the npm site.

Related

Composer install failed. The Composer installer script did not run correctly [exit code 259]

The Composer installer script did not run correctly [exit code 259] and no output was returned.
enter image description here
I tried hard to install composer from install via cmd and even the GUI now. I have uninstalled my xampp many times to install composer and even I have also installed xampp version 5 but the result is still the same or the error remains, I have also turned off the antivirus and various others. Please help me
This error message means that the Composer installer script has encountered an error and has stopped running. The exit code 259 indicates that there was a problem with the script and it could not be completed.
To resolve this issue, follow these steps:
Check for any error messages in the terminal or log files.
Ensure that all dependencies and requirements for the composer install are met.
Check if the environment variables are set correctly.
Try running the command with elevated privileges, i.e. using sudo.
If the error persists, try uninstalling and reinstalling Composer.
If the problem persists, you can also seek assistance from the Composer community or reach out to the vendor for support.

Failed to initialize global composer: mac /Sites

Trying to view a local website:
"Uncaught Error: Class 'ComposerAutoloaderInite0e6765..etc' not found in /Users/{ username }/Sites/{ sitename }/htdocs/vendor/twig-autoload.php".
So on into Terminal to do composer dump-autoload. (It worked the first time I did it).
I now get this message:
"The 'git' command requires command line developer tools. Would you like to install the tools now?" (It asks for Xcode)
I click No.
Terminal tells me the file command has been run OK, but no...
Repeating the dump autoload with -vvv reveals the truth:
Failed to initialize global composer: Composer could not find the config file: /Users/{ username }/.composer/composer.json
Searching about, the only things I've found on the composer error seem to be related to Lavarel.
info:
Composer is installed in /Sites/{ sitename }/vendor/
Composer version: 1.10.6
So what I'd like to understand:
Why is composer trying to initialise a 'global composer'? Does it think the locally installed one is global, or could there be another Composer it's trying to default to?
How do I tell composer where the json file is?
What should I do about the xCode message, if anything?
I've reinstalled composer (and Twig - the only package I'm using - seems overkill for one package, but trying out alternatives didn't end well).
The site is now back running (locally).
Still have the issue of xCode request from Terminal, but that's for another question.
So the answer seems to be: Reinstall composer and packages.

Hyperledger Fabric: Issues with composer version

I am new to the hyperledger composer. To install it, I follow the steps mentioned here: Hyperledger Composer
However, I am facing the following issue:
Error: Cannot use Composer version #package_branch_alias_version# (1.0.0-beta2) 2016-03-27 16:00:34 version of composer with fabric 1.2, v0.20 or higher is required
I would also like to add that I have checked the composer version composer -v which is: Composer version #package_branch_alias_version# (1.0.0-beta2) 2016-03-27 16:00:34
P.S I can see a similar post createPeerAdminCard.sh not running. However, I couldn't solve my problem yet. It would be great if someone could explain " uninstall the 'other composer' and then install composer-cli with -g as per the Composer Dev Environment documents." I have already followed the guidelines stated in Updating components
Please guide me.
First off I would like to point out that Hyperledger Composer is end of life, you should not be using it except maybe to get a general idea around the concept of digital assets and not as a learning tool for hyperledger fabric.
In your case the problem is you have not installed hyperledger composer, you have installed another tool called composer by the looks of things.
To start with Hyperledger composer, its better to start with installing pre-reqs using this:
curl -O https://hyperledger.github.io/composer/v0.19/prereqs-ubuntu.sh
chmod u+x prereqs-ubuntu.sh
Then Simply running: npm install -g composer-cli#0.19
You can refer: https://hyperledger.github.io/composer/v0.19/installing/development-tools

Laravel Installer method

Normally I do install Laravel 5.1 by following this command regarding to documentation:
composer create-project laravel/laravel --prefer-dist
It works fine.
But I read in the documentation under "Via Laravel Installer" also it is possible to install via Laravel Installer, which is much faster than installing via Composer:
laravel new blog
But to use this method I need to run following command once:
composer global require "laravel/installer=~1.1"
When I do run it I get following errors many times
Deprecation Notice: Composer\Package\Version\VersionParser::parseLinks
is deprecated. Use \Composer\Package\Loader\ArrayLoader::parseLinks()
instead in
phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Package/Version/VersionParser.php:226
after many line of same error ./composer.json has been updated appears and it continues with the same line of errors, it ends with following
Loading composer repositories with package information Updating
dependencies (including require-dev) Nothing to install or update
Generating autoload files
What is wrong with it? Any idea or solution.
My environment: Windows 10, GitBash and cmder console.
Update of composer, I did ran composer self-update also
Snapshot of console
EDIT:
Note, I can confirm after solving the issue that the installation via Laravel Installer method is faster than composer.
The Composer Assets Plugin you've installed locally is using a deprecated method of Composer. The plugin is already fixed, so run composer global update to get the latest versions with the bug fix. After it, you should be able to run the command succesfully.
If this doesn't work (as you might get the same error running the previous command), try removing the global vendor directory. When running any global Composer command, it outputs something like "Changed current directory to XXX". Remove the XXX/vendor directory and then try running the command.
In addition to #WouterJ answer.
Worst case if the steps provided by #WouterJ did not work, you could manage to uninstall and reinstall composer for windows.
When done, run composer global update to be sure to get latest updates, if there was.
Then run composer global require "laravel/installer=~1.1" and it should works.
Remember to update your windows environment path C:\Users\UserName\AppData\Roaming\Composer\vendor\bin

Install Laravel behind proxy

Im trying to install Laravel on a windows machine.
I followed this guide up to point 11.
http://www.wikihow.com/Install-Laravel-Framework-in-Windows
I also ran two commands already (which I got from https://stackoverflow.com/a/18852026/2240163)
set http_proxy=<your_http_proxy:proxy_port>
set https_proxy=<your_https_proxy:proxy_port>
But on running composer install i am met with a message
C:\wamp\www\LARAVEL>composer install
Loading composer repositories with package information
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: SSL
: The specified procedure could not be found.
failed to open stream: Cannot connect to HTTPS server through proxy
How can I get past the proxy to install Laravel 4.
.
.
Here in lay the solution
C:\wamp\www\LARAVEL>set http_proxy=http://mnel:******#192.168.20.4:8080
C:\wamp\www\LARAVEL>set https_proxy=https://mnel:******#192.168.20.4:8080
I then ran the install composer command again and presto!
https://stackoverflow.com/a/24958700/2240163
Thanks #mneute
Here in lay the solution
C:\wamp\www\LARAVEL>set http_proxy=http://mnel:******#192.168.20.4:8080
C:\wamp\www\LARAVEL>set https_proxy=https://mnel:******#192.168.20.4:8080
I then ran the install composer command again and presto!
https://stackoverflow.com/a/24958700/2240163
Thanks #mneute
I got this same issue when I ran composer -vvv install. I did it in windows7 computer behind a company firewall. I search and tried every possible answer but didn't work. Then I tried following and it did work
https://www.calazan.com/how-to-set-the-proxy-settings-in-windows-via-command-line/

Resources