0
votes

my command to install package in my project:

composer require kartik-v/yii2-widget-fileinput "@dev"

Error:

Installation failed, reverting ./composer.json to its original content.

[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Connection timed out

{"packages":[],"notify":"/downloads/%package%","notify-batch":"/downloads/","providers-url":"/p/%package%$%hash%.json","search":"/search.json?q=%query%&type=%type%","provider-includes":{"p/provider-2013$%hash%.json":{"sha256":"4d53f1a16016320fcc99944a992dca985276ec8d2fa6eda0aedd598d3c4ebb4e"},"p/provider-2014$%hash%.json":{"sha256":"11cb8946ddcce24472c5caf74ac7eaf89c392de637050c19cdc6123157c88dfc"},"p/provider-2015$%hash%.json":{"sha256":"13febd34889d5c52635fe1b48a6c0fffe6155878203653967db5ce9908ee3eac"},"p/provider-2016$%hash%.json":{"sha256":"4910c4753a41ea08e443ddea28bb9bb5543f0b98af9a2a3eb3d422781bf51630"},"p/provider-2016-07$%hash%.json":{"sha256":"90efc01598f01ac3d9fdb382e4ebcf8ecdc938a1af012dd3ded324ad8d8d506d"},"p/provider-2016-10$%hash%.json":{"sha256":"bf3c17c4ae7b4b6cce96e368115f8a8871dde5b5ea02bc0e65b8364301d350a4"},"p/provider-2017-01$%hash%.json":{"sha256":"4809e805bba5483061b30a8cfaf49c39dbbce51059a36d2a6950c6491564fd8b"},"p/provider-2017-04$%hash%.json":{"sha256":"974ef11119a0f2994debe590aa9f1c2fa4f7cc507e097f11cdff0cb97230416b"},"p/provider-archived$%hash%.json":{"sha256":"5c59e338689eed722d3289142ccdf466268f4c3c835a8531b9f254329f90515b"},"p/provider-latest$%hash%.json":{"sha256":"1cd22a68de5745f12b60ddb9896f3afb0145d915b647771e331677a7ad805e31"}}}

This comes when i got to https://packagist.org/packages.json link

1
did you try it again? - R13e
ya i am trying it repeatedly but still same error - john sunam
right away, I copy the command and it runs smoothly. - R13e
can you reach packagist.org/packages.json from browser? - R13e
i have posted the result when i got to packagist.org/packages.json link - john sunam

1 Answers

0
votes

Try to update your composer asset plugin.

Open your shell and run.

composer global require "fxp/composer-asset-plugin:dev-master"

Then run

composer update