wpemerge-theme icon indicating copy to clipboard operation
wpemerge-theme copied to clipboard

Requirements error when trying to require htmlburger/wpemerge-theme within Bedrock

Open RBFraphael opened this issue 3 years ago • 3 comments

Version

  • WP Emerge Starter Theme: 0.17.1
  • WordPress: 6.0
  • PHP: 8.1

Expected behavior

WP Emerge Theme to be installed and created at /web/app/themes

Actual behavior

composer require htmlburger/wpemerge-theme Throws an requirement error as follows:

Using version ^0.17.1 for htmlburger/wpemerge-theme
./composer.json has been updated
Running composer update htmlburger/wpemerge-theme
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires htmlburger/wpemerge-theme ^0.17.1 -> satisfiable by htmlburger/wpemerge-theme[0.17.1].
    - htmlburger/wpemerge-theme 0.17.1 requires composer/installers ^1.4 -> found composer/installers[v1.4.0, ..., 1.x-dev] but it conflicts with your root composer.json require (^2.1).

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require htmlburger/wpemerge-theme:*" to figure out if any version is installable, or "composer require htmlburger/wpemerge-theme:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Steps to reproduce (in case of a bug)

  1. Create a new Bedrock project running composer create-project roots/bedrock
  2. cd to root folder of your bedrock install
  3. Try to create WP Emerge Theme with composer require htmlburger/wpemerge-theme

Comments

Just followed official documentation found at https://docs.wpemerge.com/#/starter/theme/quickstart (the Quick start on Bedrock section).

RBFraphael avatar Jul 08 '22 13:07 RBFraphael

Nobody?

RBFraphael avatar Jul 11 '22 02:07 RBFraphael

Hi @RBFraphael ,

It seems the latest version of Bedrock requires a higher major version of composer/installers that the latest version of the theme. Compatibility with composer/installers:^2 has to be tested and updated if necessary but in the meantime you'll have to look into either downgrading it (and making sure it still works with Bedrock) or "lying" about which version is required in your composer.json file.

atanas-dev avatar Jul 11 '22 08:07 atanas-dev

Hi @atanas-dev !

Thank you for your reply. I've tested creating a new WP Emerge theme directly withint web/app/themes just like a project without Bedrock (using composer create-project htmlburger/wpemerge-theme in themes directory instead composer require on root).

Now, I think I've found another version-related error. When using latest Node LTS version (v16.16.0), I've got a lot of warnings and fatal errors that results on theme not installed. But, when using the LTS 14 (latest is v14.20.0), the theme is installed successfully, but a lot of warnings persists. I think developers need to check for package manager updates (NodeJS and Composer), because updated versions aren't working as expected.

RBFraphael avatar Jul 11 '22 21:07 RBFraphael