fxpio / composer-asset-plugin

NPM/Bower Dependency Manager for Composer
MIT License
893 stars 156 forks source link

Invalid Repository Exception #304

Closed tungdt-90 closed 7 years ago

tungdt-90 commented 7 years ago

I'm using Composer version 1.4.2

I've tried with both version of this plugin: 1.3.0 and 1.3.1

This is a bug that has been asked in #64, and you labeled it as FIXED already. But somehow, I got this bug today.

I'm installing Oro Commerce , I follow every steps in there, and when I run "composer install --prefer-dist", I got the error

[Composer\Repository\InvalidRepositoryException]                                                                                                          
No valid bower.json was found in any branch or tag of https://github.com/PawelDecowski/jQuery-CreditCardValidator.git, could not load a package from it.

It throws error when trying to install jQuery Credit Card Validator

Here is the full trace:

Exception trace:
 () at /home/****/.composer/vendor/fxp/composer-asset-plugin/Repository/AssetVcsRepository.php:44
 Fxp\Composer\AssetPlugin\Repository\AssetVcsRepository->initialize() at phar:///usr/local/bin/composer/src/Composer/Repository/ArrayRepository.php:185
 Composer\Repository\ArrayRepository->getPackages() at phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Pool.php:104
 Composer\DependencyResolver\Pool->addRepository() at /home/www-data/.composer/vendor/fxp/composer-asset-plugin/Repository/Util.php:71
 Fxp\Composer\AssetPlugin\Repository\Util::addRepositoryInstance() at /home/www-data/.composer/vendor/fxp/composer-asset-plugin/Repository/Util.php:44
 Fxp\Composer\AssetPlugin\Repository\Util::addRepository() at /home/www-data/.composer/vendor/fxp/composer-asset-plugin/Repository/AbstractAssetsRepository.php:141
 Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository->whatProvides() at phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Pool.php:204
 Composer\DependencyResolver\Pool->computeWhatProvides() at phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Pool.php:193
 Composer\DependencyResolver\Pool->whatProvides() at phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php:161
 Composer\DependencyResolver\RuleSetGenerator->whitelistFromPackage() at phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php:273
 Composer\DependencyResolver\RuleSetGenerator->whitelistFromJobs() at phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php:324
 Composer\DependencyResolver\RuleSetGenerator->getRulesFor() at phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php:214
 Composer\DependencyResolver\Solver->solve() at phar:///usr/local/bin/composer/src/Composer/Installer.php:472
 Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:223
 Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php:119
 Composer\Command\InstallCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:267
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:846
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:191
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:227
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:122
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:100
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:54
 require() at /usr/local/bin/composer:24
francoispluchino commented 7 years ago

I just tested, and I have no problem.

Composer.json

{
    "require": {
        "bower-asset/jquery-creditcardvalidator": "*"
    }
}
$ composer install --prefer-dist
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Installing bower-asset/jquery (3.2.1): Downloading (100%)
  - Installing bower-asset/jquery-creditcardvalidator (v1.1.0): Downloading (100%)
Writing lock file
Generating autoload files

Are you authenticated between Composer and Github? This is not the intended message, but it looks like you are not accessing to the JSON file with the Github APIs.

You can read the FAQs Why should I create a token for Github? or the doc Use no-api option of VCS Github driver.

tungdt-90 commented 7 years ago

Hi @francoispluchino, I did authenticated, because Composer will ask me to provide a token. But you can run it normally, so the issue must come from my computer. I will check again.

Thank you.

tungdt-90 commented 7 years ago

I think I found my problem.

I used token of my friend's account, and nothing happens. Guess my github account has problem.