Install custom theme in Drupal using composer - drupal

I couldn't install custom theme on drupal 8/9 using composer. This kind of error faced
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Now how can I solve it?
Installation failed, reverting ./composer.json and ./composer.lock to their original content.our text

If you are using Lando, maybe you are missing information about node in lando.yml.
Example:
services:
node:
type: 'node:10'
build:
- gulp
Globals:
gulp-cli: latest

Related

How to install patched modules in fresh Drupal 10 Installation?

I have a fresh Drupal 10 Installation und would like to install some modules with more ore less simple patches. I tried it in different ways and get allways the same errors with composer require.
This are my steps:
manual changed files for exampe in superfish for this patch:
https://www.drupal.org/files/issues/2022-08-01/superfish-%233.patch and manually put the module in module/contrib folder. Than I tried composer require drupal/superfish:~1.4 with different versions and with and without parameter -W.
I wrote patch in composer.json and tried composer install. There comes the message nothing to install or update. I used also composer update --lock
I downloaded last dev-Version and patch and tried with git apply.
The result with composer require is more ore less the same error like this:
Problem 1 - drupal/block_content_permissions[1.0.0, ..., 1.8.0]
require drupal/core ^8 -> found drupal/core[8.0.0, ..., 8.9.20] but
these were not loaded, likely because it conflicts with another
require. - drupal/block_content_permissions[1.9.0, ..., 1.10.0]
require drupal/core ^8 || ^9 -> found drupal/core[8.0.0, ..., 8.9.20,
9.0.0, ..., 9.5.0] but these were not loaded, likely because it conflicts with another require. - Root composer.json requires
drupal/block_content_permissions * -> satisfiable by
drupal/block_content_permissions[1.0.0, ..., 1.10.0].
You can also try re-running composer require with an explicit version
constraint, e.g. "composer require drupal/block_content_permissions:*"
to figure out if any version is installable, or "composer require
drupal/block_content_permissions:^2.1" if you know which you need.
If I enable the patched modules manualy in backend, they work normaly. But they are not under composer controll.
How to do in the right way?
Drupal.org has a documented process for allowing a lenient composer install.
For Drupal 10:
Try the Lenient Composer Plugin
The lenient composer plugin lets you specify an allowlist of packages
where you are willing to break the version constraint, using a command
like:
composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/token"]'
Together with the Composer Patches Plugin, this allows you to install
any Drupal extension, even if the version constraint hasn't been
officially updated yet. Of course the code may still need to be
patched for deprecations.

Symfony 6.1 reset-password php 8.1

I am trying to install the Reset Password Feature on my symfony application.
The Problem is that Composer tell me that :
Your requirements could not be resolved to an installable set of packages.
Problem 1
- php is present at version 8.1.0 and cannot be modified by Composer
- symfonycasts/reset-password-bundle v1.16.0 conflicts with php >=8.1 <8.1.10.
- Root composer.json requires symfonycasts/reset-password-bundle ^1.16 -> satisfiable
by symfonycasts/reset-password-bundle[v1.16.0-password-bundle[v1.16.0].
You can also try re-running composer require with an explicit version constraint,
e.g. "composer require symfonycasts/reset-password-buycasts/reset-password-bundle:*"
to figure out if any version is installable, or "composer require symfonycasts/e-paif
you know which yondle:*" to figure out if any version is installable, or
"composerreset-password-bundle:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
So, do I have to install a specific version ?
If you look at the composer.json of the Reset Password Bundle, you can see that there is a conflict with PHP version 8.1.0, 8.1.1, ... 8.1.10.
"conflict": {
"php": ">=8.1 <8.1.10",
"doctrine/orm": "<2.7"
},
So, yes, you have to upgrade your stack to PHP version 8.1.11
This pull request give explanations why this bundle is currently no more compatible with these PHP versions.

Cant Install Commerce Checkout Module

I'm in the process of upgrading my website from Drupal 7 to 8 and one of my tasks is to ensure that all modules are copied over and installed.
I've been able to install every 'Commerce' module apart from the checkout.
Unable to install Commerce Checkout due to unmet dependencies:
core.entity_view_display.commerce_product_variation.default.summary
(commerce_product.commerce_product_variation_type.default)
This question was asked and answered here: Can't install drupal 8 commerce checkout module
However, it does not help me because I've already used Composer to install the commerce module but I still cant enable it.
$ composer require drupal/commerce
Using version ^2.5 for drupal/commerce
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess
$ composer require drupal/commerce_checkout
Using version ^2.5 for drupal/commerce_checkout
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess
$ composer require drupal/commerce_product
Using version ^2.5 for drupal/commerce_product
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Writing lock file
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess
I appreciate any solutions that you may have and look forward to discussing this issue with you further.
Thanks!
I guess you already fixed the issue yourself simply by "installing" drupal/commerce first.
The three snippets you provided at the end of your question look fine and actually just says they are already "installed". Composer downloaded everything for you and now you just have to enable them via drush or from the UI.
Now I got it. This error message occurs when installing Commerce Checkout via drush/drupal console (or maybe even via the UI). And it says it requires a display or view mode from the Commerce Product entity type. Then I guess the second answer in the linked question is right: install Commerce Product first as that may provide the missing display upon installation.
Even if that doesn't work you may circumvent the issue by creating the display or view mode manually yourself.

Wordpress roots/sage installation options not working

I have install sage on my wordpress, but there no choice for selecting options that sage docs says
During theme installation you will have the options to:
Update theme headers (theme name, description, author, etc.)
Select a CSS framework (Bootstrap, Foundation, Tachyons, none)
Add Font Awesome
Configure Browsersync (path to theme, local development URL)
C:\php7\htdocs\blog\wp-content\themes>composer create-project roots/sage foundat
ion 8.5.3
Installing roots/sage (8.5.3)
- Installing roots/sage (8.5.3): Loading from cache
Created project in foundation
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing composer/installers (v1.4.0): Loading from cache
Writing lock file
Generating autoload files
I success activate the foundation theme on wordpress dashboard. Is I miss something?
After installing sage 9 there is still no choice for selecting options because TTY mode is not supported on Windows platforms.
To work around it, run these commands from within your theme directory:
./vendor/bin/sage meta
./vendor/bin/sage config
./vendor/bin/sage preset
You are reading the docs for sage 9.x but installing 8.5.3 which is a complete different setup and doesnt have the features mentioned above. Sage 9 can only be installed when running PHP 7.x and up.
If you just use the same composer command without the version number you shouls get the latest version.

Unable to install gos/react-amqp

Context
I am new to websockets, and trying to implement a notifications pusher on Symfony with the help of the WebsocketBundle, following this tutorial.
The bundle is implementing 3 different pushers :
I tried using the zmq pusher and it just does not seem to fit with Windows (I am getting the exact same symptoms as in the linked post)
I then tried WebSocketPusher and when I run the WSServer the port I configured in config.yml is not even opening. Same symptom as this open issue
So, finally, I tried to use AMQP pusher and this time I cannot even install it, but as my google searches do not end up in github open issues, I think that I'm probably the one missing something here, and thus I'm posting here.
Problem
I installed the php extension and it does seem to work as it appears in my php extensions and does not give any errors.
When I run the following command from the tutorial : composer require gos/react-amqp I am getting the following response :
$ composer require gos/react-amqp
Using version ^0.1.2 for gos/react-amqp
./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
- Can only install one of: evenement/evenement[v2.0.0, v2.1.0].
- Can only install one of: evenement/evenement[v2.1.0, v2.0.0].
- Can only install one of: evenement/evenement[v2.0.0, v2.1.0].
- gos/react-amqp v0.1.2 requires evenement/evenement ~2.0.0 -> satisfiable by evenement/evenement[v2.0.0].
- Installation request for gos/react-amqp ^0.1.2 -> satisfiable by gos/react-amqp[v0.1.2].
- Installation request for evenement/evenement (locked at v2.1.0) -> satisfiable by evenement/evenement[v2.1.0].
Installation failed, reverting ./composer.json to its original content.
I don't fully understand the composer error message, but it seems that he is trying to install evenement/evenement ~2.0.0 and for some reason, it fails.
So I tried to add it manually in the composer.json, and composer install ran fine, and evenement/evenement: ~2.0.0 ended up in my composer.lock file.
But the composer require gos/react-amqp command still gave me the same error message.
Same results after a composer update attempt.
Could anyone explain me what is going on ?
I am running PHP 5.5 on a WAMP Server
Alright, so I finally got it working.
For some reason composer would keep using the 2.1.0 version when it was never required.
For those running into the same kind of composer error, here is what I did :
rm composer.lock
explicitely ask for the exact minimum required version, in my case : composer require evenement/evenement:2.0 You should see something like Updating evenement/evenement (v2.1.0 => v2.0.0) Downloading: 100% in the console
composer install

Categories

Resources