Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find 'php-cs-fixer'. The program may not be installed. #1563

Closed
tunapiq opened this issue Mar 21, 2017 · 2 comments
Closed

Could not find 'php-cs-fixer'. The program may not be installed. #1563

tunapiq opened this issue Mar 21, 2017 · 2 comments

Comments

@tunapiq
Copy link

tunapiq commented Mar 21, 2017

See https://github.com/FriendsOfPHP/PHP-CS-Fixer for program installation instructions.
You can configure Atom Beautify with the absolute path to 'php-cs-fixer.phar' by setting 'PHP - CS Fixer Path' in the Atom Beautify package settings.
Your program is properly installed if running 'where.exe php-cs-fixer' in your CMD prompt returns an absolute path to the executable. If this does not work then you have not installed the program correctly and so Atom Beautify will not find the program. Atom Beautify requires that the program be found in your PATH environment variable.
Note that this is not an Atom Beautify issue if beautification does not work and the above command also does not work: this is expected behaviour, since you have not properly installed your program. Please properly setup the program and search through existing Atom Beautify issues before creating a new issue. See https://github.com/Glavin001/atom-beautify/search?q=php-cs-fixer&type=Issues for related Issues and https://github.com/Glavin001/atom-beautify/tree/master/docs for documentation. If you are still unable to resolve this issue on your own then please create a new issue and ask for help.
Hide Stack Trace
Error: Could not find 'php-cs-fixer'. The program may not be installed.
at PHPCSFixer.module.exports.Beautifier.commandNotFoundError (file:///C:/Users/TunapiQ/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee:204:14)
at file:///C:/Users/TunapiQ/.atom/packages/atom-beautify/src/beautifiers/php-cs-fixer.coffee:56:28
at tryCatcher (C:\Users\TunapiQ.atom\packages\atom-beautify\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\TunapiQ.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (C:\Users\TunapiQ.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (C:\Users\TunapiQ.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (C:\Users\TunapiQ.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:693:18)
at Promise._fulfill (C:\Users\TunapiQ.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:638:18)
at PromiseArray._resolve (C:\Users\TunapiQ.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise_array.js:126:19)
at PromiseArray._promiseFulfilled (C:\Users\TunapiQ.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise_array.js:144:14)
at Promise._settlePromise (C:\Users\TunapiQ.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:574:26)
at Promise._settlePromise0 (C:\Users\TunapiQ.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (C:\Users\TunapiQ.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:693:18)
at Async._drainQueue (C:\Users\TunapiQ.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:133:16)
at Async._drainQueues (C:\Users\TunapiQ.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:143:10)
at Async.drainQueues (C:\Users\TunapiQ.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:17:14)

@prettydiff
Copy link
Collaborator

This error message is saying that PHP-CS-Fixer needs to be installed independently of Atom Beautify and it needs to be add to the path variable so that any command line application can globally access that application by command.

Do you have PHP-CS-Fixer installed and added to the path?

@Glavin001 Glavin001 changed the title Plugin Not working Could not find 'php-cs-fixer'. The program may not be installed. Apr 9, 2017
@Glavin001
Copy link
Owner

I really want to focus on improving the installation experience for users. I have created a new Issue, #1687, to target this problem. Please provide your feedback! Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants