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
[error] No files matching the pattern were found: "path/to/file.php". #2119
Comments
Hi @Shamo84, I wasn't able to reproduce the issue: $ npm install --global prettier @prettier/plugin-php
added 8 packages, and audited 9 packages in 5s
2 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
$ prettier foo.php
<?php
if (true) {
echo "foo";
}
$ prettier foo.php --write
foo.php 7ms
$ cat foo.php
<?php
if (true) {
echo "foo";
} Can the file path be resolved when you replace |
I'm getting a similar message using the package as a devDependency with Yarn: $ yarn run prettier path/to/file.php --write
# Output:
# [error] No parser could be inferred for file: path/to/file.php |
Same issue for me. Tried with node 20.4.0 with either yarn 1.22.19 or npm 9.7.2 under macos fresh global install in all cases, the next call to |
Try use prettier 2.8.8 instead of 3.0 |
Hi @Shamo84 , I ran into a similar issue, and if you use prettier 3, you need to explicitly enable the plugin by passing See #2215 (comment) |
so I installed this plugin globally with:
npm install --global prettier @prettier/plugin-php
but when I run
prettier path/to/file.php --write
i get this error:
[error] No files matching the pattern were found: "path/to/file.php".
The text was updated successfully, but these errors were encountered: