Prettier plugin is not working

I'm trying to use prettier-plugin-tailwindcss, but I'm getting the 'Cannot find package 'prettier-plugin-tailwindcss'' error, even though it is installed. I'm using Yarn Berry, so that might be the issue. Do you know how to configure Prettier plugins with Yarn Berry?

 

 //.prettierrc
 {
   "printWidth": 80,
   "tabWidth": 2,
   "semi": true,
   "singleQuote": true,
   "bracketSpacing": false,
   "bracketSameLine": true,
   "plugins": ["prettier-plugin-tailwindcss"]
 }

 

"dependencies": {
    "@sentry/react": "^8.22.0",
    "@sentry/tracing": "7.114.0",
    "axios": "^1.7.2",
    "path": "^0.12.7",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "react-hook-form": "^7.52.1",
    "react-query": "^3.39.3",
    "react-router-dom": "^6.24.1"
  },
  "devDependencies": {
    "@sentry/vite-plugin": "^2.21.1",
    "@testing-library/dom": "^10.4.0",
    "@testing-library/react": "^16.0.0",
    "@testing-library/user-event": "^14.5.2",
    "@types/react": "^18.3.3",
    "@types/react-dom": "^18.3.0",
    "@typescript-eslint/eslint-plugin": "^7.13.1",
    "@typescript-eslint/parser": "^7.13.1",
    "@vitejs/plugin-react": "^4.3.1",
    "eslint": "^9.6.0",
    "eslint-plugin-react-hooks": "^4.6.2",
    "eslint-plugin-react-refresh": "^0.4.7",
    "i18next": "^23.12.2",
    "jsdom": "^24.1.1",
    "prettier": "^3.3.3",
    "prettier-plugin-tailwindcss": "^0.6.6",
    "react-i18next": "^15.0.0",
    "tailwindcss": "^3.4.4",
    "typescript": "^5.2.2",
    "vite": "^5.3.1",
    "vitest": "^2.0.5"
  },
  "packageManager": "yarn@4.3.1"

 

 

0
1 comment

This issue looks similar to WEB-57644. Could you please specify what version of the IDE you are using? If you are using an outdated version, please try to update WebStorm: download.
If the issue persists, could you please share an example where this issue is reproduced?

0

Please sign in to leave a comment.