hechoendrupal / drupal-console

The Drupal CLI. A tool to generate boilerplate code, interact with and debug Drupal.
http://drupalconsole.com
GNU General Public License v2.0
939 stars 559 forks source link

Installation failed, reverting ./composer.json to its original content. #4234

Open naveedjadoon opened 4 years ago

naveedjadoon commented 4 years ago

Hi! i tried to install drupal console on my site and its not working and giving me this error "Installation failed, reverting ./composer.json to its original content."

iMac:newtheming abyte$ composer require drupal/console ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Package zendframework/zend-diactoros is abandoned, you should avoid using it. Use laminas/laminas-diactoros instead. Package zendframework/zend-escaper is abandoned, you should avoid using it. Use laminas/laminas-escaper instead. Package zendframework/zend-feed is abandoned, you should avoid using it. Use laminas/laminas-feed instead. Package zendframework/zend-stdlib is abandoned, you should avoid using it. Use laminas/laminas-stdlib instead. Writing lock file Generating autoload files Hardening vendor directory with .htaccess and web.config files. Cleaning vendor directory. Scaffolding files for drupal/core:

Installation failed, reverting ./composer.json to its original content.

[RuntimeException]
Could not delete /Applications/MAMP/htdocs/newtheming/sites/default/default.services.yml:

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] []...

gorkaguerrero commented 4 years ago

You dont have permissions in /sites/default folder (probably is 555). Changing temporarely to 755 before doing composer and back to 555 after should do the trick, but IMO is not the best solution