AtomLinter / linter-phpmd

Atom linter plugin for php, using phpmd.
21 stars 4 forks source link

Error: spawn phpmd ENOENT #71

Closed twoelevenjay closed 8 years ago

twoelevenjay commented 8 years ago

I am getting this error when saving the file in Atom. The full error i get is:

Error: spawn phpmd ENOENT
    at exports._errnoException (util.js:856:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at doNTCallback2 (node.js:465:9)
    at process._tickCallback (node.js:379:17)

I have run apm install linter along with:

apm install linter-jshint linter-php linter-phpcs linter-phpmd linter-scss-lint linter-csslint linter-js-yaml linter-tidy linter-htmlhint

I am also using: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards

Everything works except for the error mentioned on save.

Is there something that I can check for?

twoelevenjay commented 8 years ago

I found the answer, I had to add ~/.composer/vendor/bin to my PATH.

stipsan commented 8 years ago

Thanks for sharing the solution @twoelevenjay 👍