htmlburger / wpemerge-theme

An organized, ES6 and SASS powered theme taking advantage of the WP Emerge framework. 🚀
https://wpemerge.com/
GNU General Public License v2.0
285 stars 32 forks source link

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

Open RBFraphael opened 2 years ago

RBFraphael commented 2 years ago

Version

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 commented 2 years ago

Nobody?

atanas-dev commented 2 years ago

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.

RBFraphael commented 2 years ago

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.