6

I am trying to install Magento2 using composer.

Getting codesniffer error and tried below steps to overcome the error but unfortunately it's not going away

STEP 1: Tried to install magento2

$ composer create-project --repository=https://repo.magento.com/magento/project-community-edition magento2

enter image description here

As you can see, the installation ended up with the error Failed to set PHP CodeSniffer installed_paths Config

STEP 2: so I tried to install the codesniffer using below command

$ composer global require "squizlabs/php_codesniffer=*"

successfully installed codesniffer as shown below enter image description here

I removed the magento2 directory to start over again

$ rm -rf magento2

STEP 3: tried to install magento2 again

$ composer create-project --repository=https://repo.magento.com/magento/project-community-edition magento2

that still ended up with the same error enter image description here

I tested the phpcs installation and there seems no issue with it

enter image description here

1
  • Did you solve this issue anyway? Feb 23 '21 at 9:34
0

In Ubuntu i used below commands,

composer require magento/magento-coding-standard:^2.0.0
vendor/bin/phpcs --config-set installed_paths vendor/magento/magento-coding-standard
vendor/bin/phpcs --config-set default_standard Magento2

Composer loading results from the cache if an issue still exists then append --no-cache in command.

Not the answer you're looking for? Browse other questions tagged or ask your own question.