WEB制作メモ

web制作・ビジネス・アイデア・生活・ホームページ制作・更新など

phpcs で エラーが出て消えない。

 
vscode で phpcsを入れた時にエラーがでるときの対処
phpcs: Request workspace/configuration failed with message: Unable to locate phpcs. Please add phpcs to your global path or use composer dependency manager to install it in your project locally.
PHP_CodeSnifferというパッケージが必要PCにインストール
composer global require squizlabs/php_codesniffer
composer global require  friendsofphp/php-cs-fixer
 
それでもうまくいかない場合
phpcs: Request workspace/configuration failed with message: Composer phpcs dependency is configured but was not found under vendor\bin\phpcs.bat. You may need to run "composer install" or set your phpcs.executablePath manually.
設定>phpcs.executablePathを検索して phpcsがある場所をしていする。
C:\Users\***\AppData\Roaming\Composer\vendor\bin\phpcs