-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[v3] [error] Cannot find package plugin-name imported from /.../root-project/noop.js #15085
Comments
As I tested, this doesn't work in v2. The plugin should be resolvable from your |
Sorry, this seems to be working in v2. Have pushed a v2 branch to demonstrate the behaviour.. https://github.com/vighnesh153/prettier-unable-to-find-pkg/tree/v2 Please delete |
You are right, your v2 branch works, but I don't know why. There should be something to do with npm. v2 $ ls node_modules/
prettier prettier-config prettier-plugin-tailwindcss main $ ls node_modules/
prettier prettier-config |
Just to be clear, we didn't expect this case work in v2, we can't guarantee a transitive dependency to be solved, it just happened works somehow. I don't think we will do anything, you can use one of the following js config plugins:[
require.resolve("prettier-plugin-tailwindcss")
] plugins:[
import.meta.resolve("prettier-plugin-tailwindcss")
] plugins:[
require("prettier-plugin-tailwindcss")
] plugins:[
await import("prettier-plugin-tailwindcss")
] |
Environments:
Steps to reproduce:
Minimal reproducible repo: https://github.com/vighnesh153/prettier-unable-to-find-pkg
npx prettier --write .
from the root directoryChecked with the plugin's project and they suspect the issue is with prettier v3: tailwindlabs/prettier-plugin-tailwindcss#176 (comment)
Expected behavior:
Prettier should work without throwing the following error as this works with
v2.8.8
Actual behavior:
The text was updated successfully, but these errors were encountered: