linter-phpcs icon indicating copy to clipboard operation
linter-phpcs copied to clipboard

Error running PHPCS Error

Open ghost opened this issue 9 years ago • 13 comments

[Linter] Error running PHPCS Error: Failed to spawn command `phpcs`. Make sure `phpcs` is installed and on your PATH
    at /Users/lgdeloss/.atom/packages/linter-phpcs/node_modules/atom-linter/lib/helpers.js:130:24
    at process._tickCallback (internal/process/next_tick.js:103:7)

ghost avatar Nov 28 '17 21:11 ghost

Make sure that phpcs has been installed. which phpcs should return the path to it if things are setup properly 😉.

Arcanemagus avatar Nov 28 '17 21:11 Arcanemagus

It was installed. I installed through atom

ghost avatar Nov 28 '17 21:11 ghost

This package (linter-phpcs) is just a wrapper around the PHP_CodeSniffer utility. You need to follow their installation instructions in order to have it available on your system.

Arcanemagus avatar Nov 28 '17 22:11 Arcanemagus

Yeah, so I have followed the instructions and I'm still getting the same error, Ive gone as far as uninstalling and re-installing atom

ghost avatar Nov 29 '17 14:11 ghost

What does which phpcs return when you run that in a CLI?

Arcanemagus avatar Nov 29 '17 17:11 Arcanemagus

@Arcanemagus I have the same issue. I have it installed in my Documents folder (Mac). Does the directory location for PHPCodeSniffer matter? I configured the package in Atom to point to that location, but I still can't get it work. Any suggestions?

ScarletPonytail avatar Jul 19 '18 09:07 ScarletPonytail

image

image

ScarletPonytail avatar Jul 19 '18 10:07 ScarletPonytail

@ScarletPonytail you should be getting a different error with that setting, are you sure you are seeing the exact same text?

Arcanemagus avatar Jul 19 '18 16:07 Arcanemagus

I made some changes to the file location, and the error has now changed (if you want me to create a new issue I can do).

@Arcanemagus Here is my Atom config:

image

...and here is the Console error:

image

Thanks.

ScarletPonytail avatar Jul 20 '18 08:07 ScarletPonytail

Please create a new issue, as that is something different. When creating the issue please include the output of running /Users/lpercival/PHP_CodeSniffer/bin/phpcs --version, thanks!

Arcanemagus avatar Jul 20 '18 20:07 Arcanemagus

Looks like the same problem discussed here https://github.com/AtomLinter/linter-phpcs/issues/305 and here https://github.com/AtomLinter/linter-phpcs/issues/307

StephanSchrade avatar Aug 15 '18 14:08 StephanSchrade

Closing due to a lack of response from @gabriel88d. As pointed out by @StephanSchrade you are likely hitting the same thing as #305 @ScarletPonytail.

Arcanemagus avatar Sep 28 '18 01:09 Arcanemagus

eu tive o mesmo problema, era variaveis do sistema no windows que estava errada

matheussant6s avatar May 20 '20 07:05 matheussant6s