fxpio / composer-asset-plugin

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

Different behavior than bower #17

Closed xxpepe84xx closed 9 years ago

xxpepe84xx commented 10 years ago

Hi,

I'm trying to install some packages with the composer-asset-plugin. My composer.json looks like

{
    "require": {
        "fxp/composer-asset-plugin": "dev-master",
        "bower-asset/jquery": "dev-master",
        "bower-asset/bootstrap": "dev-master",
        "bower-asset/jquery.ui": "dev-master",
        "bower-asset/angular": "dev-master",
        "bower-asset/angular-resource": "dev-master",
        "bower-asset/angular-route": "dev-master",
        "bower-asset/angular-sanitize": "dev-master",
        "bower-asset/danialfarid-angular-file-upload": "dev-master",
        "bower-asset/angular-ui-date": "dev-master",
        "bower-asset/angularjs-nvd3-directives": "dev-master",
        "bower-asset/ng-infinite-scroller-origin": "dev-master",
        "bower-asset/chartjs": "dev-master",
        "bower-asset/d3": "3.4.11",
        "bower-asset/highlight": "dev-master",
        "bower-asset/html5shiv": "dev-master",
        "bower-asset/marked": "dev-master",
        "bower-asset/moment": "dev-master",
        "bower-asset/nvd3": "dev-master",
        "bower-asset/respond": "dev-master",
        "bower-asset/underscore": "dev-master"
    },
    "extra": {
        "asset-installer-paths": {
            "bower-asset-library": "assets/vendor"
        }
    }
}

But if I try to install I get the error:

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

  Problem 1
    - Installation request for bower-asset/angular-resource dev-master -> satisf
iable by bower-asset/angular-resource[dev-master].
    - bower-asset/angular-resource dev-master requires bower-asset/angular 1.3.0
-patch3024 -> no matching package found.
  Problem 2
    - Installation request for bower-asset/angular-route dev-master -> satisfiab
le by bower-asset/angular-route[dev-master].
    - bower-asset/angular-route dev-master requires bower-asset/angular 1.3.0-pa
tch3024 -> no matching package found.
  Problem 3
    - Installation request for bower-asset/angular-sanitize dev-master -> satisf
iable by bower-asset/angular-sanitize[dev-master].
    - bower-asset/angular-sanitize dev-master requires bower-asset/angular 1.3.0
-patch3024 -> no matching package found.
  Problem 4
    - Installation request for bower-asset/angularjs-nvd3-directives dev-master
-> satisfiable by bower-asset/angularjs-nvd3-directives[dev-master].
    - bower-asset/angularjs-nvd3-directives dev-master requires bower-asset/angu
lar >=1.2.4,<1.3 -> no matching package found.
  Problem 5
    - Installation request for bower-asset/nvd3 dev-master -> satisfiable by bow
er-asset/nvd3[dev-master].
    - bower-asset/nvd3 dev-master requires bower-asset/d3 >=3.3.13,<3.4 -> no ma
tching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your min
imum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> f
or more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common
 problems.

Directly from bower there is no problem. Here my bower.json

{
  "name": "bower",
  "dependencies": {
    "jquery": "latest",
    "bootstrap": "latest",
    "jquery.ui": "latest",
    "angular": "latest",
    "angular-resource": "latest",
    "angular-route": "latest",
    "angular-sanitize": "latest",
    "danialfarid-angular-file-upload": "latest",
    "angular-ui-date": "latest",
    "angularjs-nvd3-directives": "latest",
    "ng-infinite-scroller-origin": "latest",
    "chartjs": "latest",
    "d3": "3.4.11",
    "highlight": "latest",
    "html5shiv": "latest",
    "marked": "latest",
    "moment": "latest",
    "nvd3": "latest",
    "respond": "latest",
    "underscore": "latest"
  }
}

Do you know where the problem is?

Thanks

francoispluchino commented 10 years ago

Hi,

Currently the plugin only works in "global" mode, the PR #3082 will allow the plugin to work in "project" mode.

francoispluchino commented 10 years ago

@xxpepe84xx Is that your problem is solved by installing the plugin in global mode?

xxpepe84xx commented 10 years ago

Yes, but I need a solution for the "project" mode, so I am waiting for the solution of your PR.

francoispluchino commented 10 years ago

Right now, @seldaek is very busy, and he would like to have some time to look the changes. it's for this reason that the PR #3082 is still not merged.

francoispluchino commented 9 years ago

See #7 .

neizerth commented 9 years ago

I have same problem. I have installed plugin in global mode and then i get this output:

{
  "repositories": [
    {
      "type": "composer",
      "url": "http://packages.phundament.com"
    }
  ],
  "require": {
    "php": ">=5.3.2",
    "yiisoft/yii": "1.1.*",
    "php-imap/php-imap" : "*",
    "instaclick/bounce-mail-handler": "*",
    "bower-asset/jquery": "2.*",
    "behat/transliterator": "~1.1@dev",
    "goodnickoff/yiirestmodel": "dev-master",
    "z_bodya/yii-chosen": "dev-default",
    "bower-asset/bootstrap-multiselect": "0.9.*@dev",
    "matthiasmullie/minify": "dev-master",
    "fxp/composer-asset-plugin": "~1.0",
    "bower-asset/angular": "dev-master",
    "bower-asset/angular-resource": "dev-master"
  },
  "minimum-stability": "dev",
  "autoload": {
    "psr-0": {
      "config": "./"
    }
  },
  "extra": {
      "asset-installer-paths": {
          "npm-asset-library": "vendor/npm",
          "bower-asset-library": "../public_html/bower"
      }
  }

}
francoispluchino commented 9 years ago

@neizerth Add the @dev flag on your dependency (see #69 for read the reason).

neizerth commented 9 years ago

@francoispluchino Thanks for your reply. I changed my composer.json to

{
  "repositories": [
  {
    "type": "composer",
    "url": "http://packages.phundament.com"
  }
  ],
  "require": {
    "php": ">=5.3.2",
    "yiisoft/yii": "1.1.*",
    "php-imap/php-imap" : "*",
    "bower-asset/angular": "1.4@dev",
    "bower-asset/angular-resource": "1.4@dev"
    },
    "minimum-stability": "dev",
    "autoload": {
      "psr-0": {
        "config": "./"
      }
      },
      "extra": {
        "asset-installer-paths": {
          "npm-asset-library": "vendor/npm",
          "bower-asset-library": "../public_html/bower"
        }
      }

    }

And i have this problems :

Problem 1
    - The requested package bower-asset/angular 1.4@dev could not be found.
  Problem 2
    - Installation request for bower-asset/angular-resource 1.4@dev -> satisfiable by bower-asset/angular-resource[v1.4.0].
    - bower-asset/angular-resource v1.4.0 requires bower-asset/angular 1.4.0 -> no matching package found.