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

[error] Cannot find package 'prettier-plugin-tailwindcss' imported from […] #329

Open
thomaswitt opened this issue Nov 8, 2024 · 0 comments

Comments

@thomaswitt
Copy link

Version: 0.6.8
tailwindcss v3.4.14
node v23.1.0
package manager: npm
OS: macOS // homebrew

After installing the package, I simply can't get it to work, I always get the error message that it cannot find the package:

$ npm list --depth=0
(node:13577) ExperimentalWarning: CommonJS module /opt/homebrew/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /opt/homebrew/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
/opt/homebrew/lib
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

$ cat .prettierrc
{
  "plugins": ["prettier-plugin-tailwindcss"]
}
$ prettier  app/assets/stylesheets/application.tailwind.css >/dev/null
[error] Cannot find package 'prettier-plugin-tailwindcss' imported from /Users/thomas/Dev/test-rails-app/noop.js
$ echo $?
1
$ rm .prettierrc
$ prettier  app/assets/stylesheets/application.tailwind.css >/dev/null
$ echo $?
0

Any ideas? I tried everything for an hour, global installs, local installs, explicitly referencing paths, etc.

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

1 participant