fxpio / composer-asset-plugin

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

Asset dependencies not installing from composer.json when no lock file present #314

Closed dafeder closed 5 years ago

dafeder commented 6 years ago

Hi, I am a bit new to this ecosystem so may be missing something obvious, but I have added a bunch of bower and npm dependencies to my project. The install fine when added via composer require on the command line. However, if I remove my lock file and vendor dir and re-run composer install, I get something like

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

  Problem 1
    - The requested package npm-asset/csv.js could not be found in any version, there may be a typo in the package name.

etc, for every asset in my composer.json. My other dependencies install just fine. If I remove the asset packages from the require section of composer.json and add them again via the command line, once again they install fine.

francoispluchino commented 6 years ago

Is the plugin installed in global mode? Do you use the last versions of Composer and CAP?

dafeder commented 6 years ago

Hi @francoispluchino - thanks. I am on the most recent versions, but had not installed globally. I missed that -- the README says can be installed locally or globally, now I see that it's in the release notes. I might suggest making that more clear in the readme.

dafeder commented 6 years ago

Also obviously it would be convenient if this didn't require global installation to make projects more portable, but admitedly I don't know anything about composer plugin architecture :)

dafeder commented 6 years ago

You know, I think the docs are fine. It is explained in the main documentation, and the README was just talking about configuration, not installation. However, it would be nice to have it fail in a way that explains that global installation is required.

francoispluchino commented 6 years ago

Why not.

francoispluchino commented 5 years ago

After reflection, I have no solution to check if the plugin is installed globally or not. But if you have one, do not hesitate to do a PR.