Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

php CodeSniffer not working - Windows 10 #808

Closed
pcross1986 opened this issue May 3, 2016 · 2 comments
Closed

php CodeSniffer not working - Windows 10 #808

pcross1986 opened this issue May 3, 2016 · 2 comments

Comments

@pcross1986
Copy link

pcross1986 commented May 3, 2016

I have attached a screenshot of the errors I am getting from command line.

Once I get to the step of "npm run phpcs", this is where it fails.

phpcodesniff

Also my NPM debug log

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'phpcs' ]
2 info using npm@3.8.6
3 info using node@v6.0.0
4 verbose run-script [ 'prephpcs', 'phpcs', 'postphpcs' ]
5 info lifecycle foundationpress@2.6.1prephpcs: foundationpress@2.6.1
6 silly lifecycle foundationpress@2.6.1
prephpcs: no script for prephpcs, continuing
7 info lifecycle foundationpress@2.6.1phpcs: foundationpress@2.6.1
8 verbose lifecycle foundationpress@2.6.1
phpcs: unsafe-perm in lifecycle true
9 verbose lifecycle foundationpress@2.6.1phpcs: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\wamp\www\new-south\wp-content\themes\FoundationPress\node_modules.bin;C:\Program Files\nodejs;C:\Program Files (x86)\Lenovo\FusionEngine;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Lenovo\Bluetooth Software;C:\Program Files\Lenovo\Bluetooth Software\syswow64;C:\Program Files (x86)\Common Files\lenovo\easyplussdk\bin;C:\Program Files\Condusiv Technologies\ExpressCache;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\wamp\bin\php\php5.5.12;C:\ProgramData\ComposerSetup\bin;C:\Ruby22-x64\bin;C:\Ruby21-x64\bin;C:\Users\Preston\AppData\Roaming\npm;C:\Users\Preston\AppData\Roaming\Composer\vendor\bin
10 verbose lifecycle foundationpress@2.6.1
phpcs: CWD: C:\wamp\www\new-south\wp-content\themes\FoundationPress
11 silly lifecycle foundationpress@2.6.1phpcs: Args: [ '/d /s /c', 'gulp phpcs' ]
12 silly lifecycle foundationpress@2.6.1
phpcs: Returned: code: 1 signal: null
13 info lifecycle foundationpress@2.6.1~phpcs: Failed to exec phpcs script
14 verbose stack Error: foundationpress@2.6.1 phpcs: gulp phpcs
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:239:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:850:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid foundationpress@2.6.1
16 verbose cwd C:\wamp\www\new-south\wp-content\themes\FoundationPress
17 error Windows_NT 10.0.10586
18 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "phpcs"
19 error node v6.0.0
20 error npm v3.8.6
21 error code ELIFECYCLE
22 error foundationpress@2.6.1 phpcs: gulp phpcs
22 error Exit status 1
23 error Failed at the foundationpress@2.6.1 phpcs script 'gulp phpcs'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the foundationpress package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error gulp phpcs
23 error You can get information on how to open an issue for this project with:
23 error npm bugs foundationpress
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls foundationpress
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

@colin-marshall
Copy link
Collaborator

The screenshot says wpcs/vendor/bin/phpcs does not exist. Something must have went wrong in the previous step:
composer create-project wp-coding-standards/wpcs:dev-master --no-dev

What's the output you get when you run that?

@olefredrik
Copy link
Owner

I assume this is solved, as there was no answer from @pcross1986 . Closing issue.

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

No branches or pull requests

3 participants