fxpio / composer-asset-plugin

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

Unable to install codeceptjs #299

Closed lougreenwood closed 6 years ago

lougreenwood commented 7 years ago

When attempting to install npm-asset/codeceptjs, I'm getting package conflict errors, these errors aren't seen when installing the codeceptjs using npm.

This is the only npm package I have in my composer.json file.

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

  Problem 1
    - npm-asset/codeceptjs 0.6.2 requires npm-asset/mocha >=3.1.2,<4.0.0 -> satisfiable by npm-asset/mocha[3.1.2, 3.2.0, 3.3.0].
    - npm-asset/mocha 3.1.2 requires npm-asset/supports-color 3.1.2 -> satisfiable by npm-asset/supports-color[3.1.2].
    - npm-asset/mocha 3.2.0 requires npm-asset/supports-color 3.1.2 -> satisfiable by npm-asset/supports-color[3.1.2].
    - npm-asset/mocha 3.3.0 requires npm-asset/supports-color 3.1.2 -> satisfiable by npm-asset/supports-color[3.1.2].
    - Can only install one of: npm-asset/supports-color[3.1.2, 2.0.0].
    - npm-asset/chalk 1.1.3 requires npm-asset/supports-color >=2.0.0,<3.0.0 -> satisfiable by npm-asset/supports-color[2.0.0].
    - npm-asset/codeceptjs 0.6.2 requires npm-asset/chalk >=1.1.3,<2.0.0 -> satisfiable by npm-asset/chalk[1.1.3].
    - Installation request for npm-asset/codeceptjs ^0.6.2 -> satisfiable by npm-asset/codeceptjs[0.6.2].

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

Here's my composer.json file:

{
    "require": {
        "php": ">=7.1",
        "illuminate/contracts": "5.3.*",
        "composer/installers" : "~1.0",
        "illuminate/container": "5.3.*",
        "bower-asset/jquery": "^3.1",
        "bower-asset/jquery-circle-progress": "^1.1.3",
        "zordius/lightncandy": "dev-master",
        "bower-asset/animate-sass": "^0.6.6",
        "bower-asset/fontawesome": "^4.6.3",
        "bower-asset/jquery-ui": "^1.12",
        "bower-asset/requirejs": "^2.2",
        "bower-asset/highcharts": "^4.2.6",
        "bower-asset/select2": "^4.0.3",
        "bower-asset/requirejs-domready": "^2.0.1",
        "bower-asset/jquery-file-upload": "^9.12.5",
        "websafe/lib-websafe-blueimp-jquery-file-upload-handler": "^9.11.2",
        "bower-asset/fastclick": "^1.0.6",
        "bower-asset/datatables.net": "^1.10.12",
        "bower-asset/datatables.net-dt": "^1.10.12",
        "hanneskod/classtools": "~1.0",
        "bower-asset/jquery-form-validator": "^2.3",
        "bower-asset/hint.css": "^2.4",
        "bower-asset/pickadate": "dev-master"
    },
    "require-dev":{
        "codeception/codeception": "*",
        "lucatume/wp-browser": "~1.11",
        "npm-asset/codeceptjs": "^0.6.2",
        "npm-asset/codeceptjs-webdriverio": "^1.0"
    },
}
francoispluchino commented 7 years ago

Because Composer (and so, this plugin) cannot install many versions of the same dependency.

npm-asset/mocha@3.1.2 requires npm-asset/supports-color@3.1.2 and npm-asset/chalk@1.1.3 requires npm-asset/supports-color@>=2.0.0,<3.0.0. So the versions 3.1.2 and 2.0.0 of npm-asset/supports-color must be installed, which is not possible (specified by the error - Can only install one of: npm-asset/supports-color[3.1.2, 2.0.0].).

To solve your problem, you must have only one version for each dependency.