fxpio / composer-asset-plugin

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

Cannot install npm-asset/socket.io #275

Closed koxu1996 closed 7 years ago

koxu1996 commented 7 years ago

I am getting error:

Using version ^1.7 for npm-asset/socket.io          
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - npm-asset/socket.io 1.7.2 requires npm-asset/engine.io 1.8.2 -> satisfiable by npm-asset/engine.io[1.8.2].
    - npm-asset/socket.io 1.7.3 requires npm-asset/engine.io 1.8.3 -> satisfiable by npm-asset/engine.io[1.8.3].
    - npm-asset/socket.io 1.7.0 requires npm-asset/engine.io 1.8.1 -> satisfiable by npm-asset/engine.io[1.8.1].
    - npm-asset/socket.io 1.7.1 requires npm-asset/engine.io 1.8.1 -> satisfiable by npm-asset/engine.io[1.8.1].
    - npm-asset/engine.io 1.8.2 requires npm-asset/engine.io-parser 1.3.2 -> satisfiable by npm-asset/engine.io-parser[1.3.2].
    - npm-asset/engine.io 1.8.3 requires npm-asset/engine.io-parser 1.3.2 -> satisfiable by npm-asset/engine.io-parser[1.3.2].
    - npm-asset/engine.io 1.8.1 requires npm-asset/engine.io-parser 1.3.1 -> satisfiable by npm-asset/engine.io-parser[1.3.1].
    - npm-asset/engine.io-parser 1.3.2 requires npm-asset/wtf-8 1.0.0 -> no matching package found.
    - npm-asset/engine.io-parser 1.3.1 requires npm-asset/wtf-8 1.0.0 -> no matching package found.
    - Installation request for npm-asset/socket.io ^1.7 -> satisfiable by npm-asset/socket.io[1.7.0, 1.7.1, 1.7.2, 1.7.3].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

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

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

Why there is no package found for wtf-8? Is it composer problem or I have something wrong with configuration?

francoispluchino commented 7 years ago

Strange, the packages in NPM registry are not loaded for wtf-8.

francoispluchino commented 7 years ago

Problem found... The driver initialization throws an exception. I fix this bug.

francoispluchino commented 7 years ago

The repository registred in NPM registry is https://github.com/mathiasbynens/wtf-8.js but this repository doesn't exist. On the other hand, the repository https://github.com/mathiasbynens/wtf-8 exist. It's for this reason that the driver isn't initialized.

koxu1996 commented 7 years ago

@francoispluchino So to resolve this, should I contact with author of wtf-8 extension to update NPM registry?

francoispluchino commented 7 years ago

Why not! but I will init the registred packages in NPM registry before the initialization of the VCS driver.

francoispluchino commented 7 years ago

Registration of NPM registry packages fixed by 544b7a9c5b635193af70707509274b3a67f32cd2.

But your dependency cannot be installed because the npm-asset/debug dependency is required by 2 another dependencies with 2 different versions (2.3.3 and 2.2.0).

I will add a dependency resolution feature to fix this problem (see #276).

francoispluchino commented 7 years ago

With the last 1.3.0@dev version of this plugin, your dependency can be installed with the resolutions feature:

{
    "require": {
        "npm-asset/socket.io": "^1.7.0"
    },
    "config": {
        "fxp-asset": {
            "resolutions": {
            "npm-asset/debug": "^2.3.3",
                "npm-asset/component-emitter": "^1.2.1"
            }
        }
    }
}