wp-cli / scaffold-package-command

Scaffolds WP-CLI commands with functional tests, full README.md, and more.
MIT License
68 stars 19 forks source link

Composer error #184

Closed ligne13 closed 5 years ago

ligne13 commented 5 years ago

Hi, I have an error when trying to scaffold my package :

$ wp scaffold package ligne13/hpb --dir=/home/vagrant/code/myproject/wp-cli/packages/local/ligne13/hpb --skip-tests --skip-readme --skip-github --force
Success: Created package files in /home/vagrant/code/myproject/wp-cli/packages/local/ligne13/hpb
Installing package ligne13/hpb (dev-master)
Updating /home/vagrant/.wp-cli/packages/composer.json to require the package...
Registering /home/vagrant/code/myproject/wp-cli/packages/local/ligne13/hpb as a path repository...
Using Composer to install the package...
---
Loading composer repositories with package information
Updating dependencies
Resolving dependencies through SAT
Dependency resolution completed in 0.310 seconds
Your requirements could not be resolved to an installable set of packages.
Problem 1
    - The requested package ligne13/hpb dev-master exists as ligne13/hpb[dev-wpcli-export] but these are rejected by your constraint.
Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.
---
Error: Package installation failed (Composer return code 2).
Reverted composer.json.

It seems to be a composer error. How can I fix that ?

Using WP CLI 1.5.1. Same error with WP CLI 2.0.1

thanks

schlessera commented 5 years ago

You seem to have pulled in dev-wpcli-export as a branch, which does not fit your requirements of using the master branch. The problem can either be a configuration in your composer.json file, or the fact that Composer might have pulled code in from its cache.

It is the installation step that is failing, so you can skip it using --skip-install and peek into the package to set it up manually if needed.