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

Global installation (from README) did not appear to work #376

Closed
fredemmott opened this issue Apr 11, 2018 · 3 comments
Closed

Global installation (from README) did not appear to work #376

fredemmott opened this issue Apr 11, 2018 · 3 comments

Comments

@fredemmott
Copy link

$ yarn global add prettier/prettier @prettier/plugin-php
Using globally installed version of Yarn
yarn global v1.5.1
[1/4] 🔍  Resolving packages...
warning prettier/prettier > editorconfig > @types/[email protected]: This is a stub types definition for commander (https://github.com/tj/commander.js). commander provides its own type definitions, so you don't need @types/commander installed!
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
success Installed "[email protected]" with binaries:
      - prettier
warning "@prettier/[email protected]" has no binaries
✨  Done in 6.05s.
$ prettier ./test2.php
[error] test2.php: SyntaxError: Unexpected token (1:2)
[error] > 1 | <?php
[error]     |  ^
[error]   2 |
[error]   3 | function foo($bar): {
[error]   4 | }

However:

$  prettier --plugin=/Users/fredemmott/.config/yarn/global/node_modules/@prettier/plugin-php --parser php ./test2.php
<?php
function foo($bar)
{

}
@czosel
Copy link
Collaborator

czosel commented Apr 12, 2018

This is probably blocked by prettier/prettier#4000

@czosel
Copy link
Collaborator

czosel commented May 16, 2018

Fixed in #416

@czosel czosel closed this as completed May 16, 2018
@camflan
Copy link

camflan commented Jun 19, 2018

This is still not working for me without specifying the plugin path like,
yarn prettier --plugin node_modules/@prettier/plugin-php app/Repositories/Eloquent/PropertyRevenueSummaryRepository.php

Prettier 1.13.5
Latest npm prettier/plugin-php

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

No branches or pull requests

3 participants