drupal-console icon indicating copy to clipboard operation
drupal-console copied to clipboard

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

Open naveedjadoon opened this issue 4 years ago • 1 comments

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:

  • Copy [project-root]/.editorconfig from assets/scaffold/files/editorconfig
  • Copy [project-root]/.gitattributes from assets/scaffold/files/gitattributes
  • Copy [web-root]/.csslintrc from assets/scaffold/files/csslintrc
  • Copy [web-root]/.eslintignore from assets/scaffold/files/eslintignore
  • Copy [web-root]/.eslintrc.json from assets/scaffold/files/eslintrc.json
  • Copy [web-root]/.ht.router.php from assets/scaffold/files/ht.router.php
  • Copy [web-root]/.htaccess from assets/scaffold/files/htaccess
  • Copy [web-root]/example.gitignore from assets/scaffold/files/example.gitignore
  • Copy [web-root]/index.php from assets/scaffold/files/index.php
  • Copy [web-root]/INSTALL.txt from assets/scaffold/files/drupal.INSTALL.txt
  • Copy [web-root]/README.txt from assets/scaffold/files/drupal.README.txt
  • Copy [web-root]/robots.txt from assets/scaffold/files/robots.txt
  • Copy [web-root]/update.php from assets/scaffold/files/update.php
  • Copy [web-root]/web.config from assets/scaffold/files/web.config
  • Copy [web-root]/sites/README.txt from assets/scaffold/files/sites.README.txt
  • Copy [web-root]/sites/development.services.yml from assets/scaffold/files/development.services.yml
  • Copy [web-root]/sites/example.settings.local.php from assets/scaffold/files/example.settings.local.php
  • Copy [web-root]/sites/example.sites.php from assets/scaffold/files/example.sites.php

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] [--] []...

naveedjadoon avatar Mar 04 '20 06:03 naveedjadoon

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

gorkaguerrero avatar Apr 05 '20 10:04 gorkaguerrero