Skip to content

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

Open
@thomaswitt

Description

@thomaswitt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions