fxpio / composer-asset-plugin

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

Requested packages cannot be found... needs installation of plugin first ? #197

Closed gossi closed 8 years ago

gossi commented 8 years ago

Hi,

This is my require section:

    "require" : {
        "fxp/composer-asset-plugin" : "~1.0",
        "bower-asset/bootstrap" : "~3",
        "bower-asset/font-awesome" : "~4",
        "bower-asset/swagger-ui" : "~2",
        "bower-asset/jquery-migrate" : "~1"
    }

When I run composer install, I get this following error messages:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package bower-asset/bootstrap could not be found in any version, there may be a typo in the package name.
  Problem 2
    - The requested package bower-asset/font-awesome could not be found in any version, there may be a typo in the package name.
  Problem 3
    - The requested package bower-asset/swagger-ui could not be found in any version, there may be a typo in the package name.
  Problem 4
    - The requested package bower-asset/jquery-migrate could not be found in any version, there may be a typo in the package name.

My workaround here is, to remove the bower-asset requirements from composer.json, run install, then readd them and run composer update. That way the plugin is installed first and then all assets.

I'm wondering if that is the supposed way to do that? If not, what am I doing wrong? Thanks.

francoispluchino commented 8 years ago

Plugin must be installed global mode, not in project mode.

gossi commented 8 years ago

I guess there is no chance to make this available on a project level?

francoispluchino commented 8 years ago

No, alas..

gossi commented 8 years ago

I understand the composer plugin workflow doesn't allow this. Thanks for the help.

brad-jones commented 8 years ago

Could this be made clearer in the docs: https://github.com/francoispluchino/composer-asset-plugin/blob/master/Resources/doc/index.md

Project scope installation suggests that this is possible when in fact it has to be installed globally.

francoispluchino commented 8 years ago

@brad-jones This section rather must be deleted.