Closed dvakatsiienko closed 9 months ago
@dvakatsiienko If you look closely at your error message, you'll see the error is coming from the esbenp.prettier
extension not mine.
@idahogurl Yes, you're right. I've accidentally had two prettiers installed. After deleting an official one, the same error persists, pointing to this extension.
Error: Cannot find module 'prettier-plugin-tailwindcss'
Require stack:
- /Users/furthur/Projects/_anadea/rocky-ui-gitlab/node_modules/.pnpm/prettier@2.8.8/node_modules/prettier/index.js
- /Users/furthur/.vscode/extensions/rvest.vs-code-prettier-eslint-5.1.0/dist/extension.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-amd.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork.js
-
Error: Cannot find module 'prettier-plugin-tailwindcss'
Require stack:
- /Users/furthur/Projects/_anadea/rocky-ui-gitlab/node_modules/.pnpm/prettier@2.8.8/node_modules/prettier/index.js
- /Users/furthur/.vscode/extensions/rvest.vs-code-prettier-eslint-5.1.0/dist/extension.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-amd.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork.js
-
at Module._resolveFilename (node:internal/modules/cjs/loader:1010:15)
at Function.s._resolveFilename (node:electron/js2c/utility_init:2:2740)
at g.resolve (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:709)
at /Users/furthur/Projects/_anadea/rocky-ui-gitlab/node_modules/.pnpm/prettier@2.8.8/node_modules/prettier/index.js:38119:25
at Array.map (<anonymous>)
at Object.load (/Users/furthur/Projects/_anadea/rocky-ui-gitlab/node_modules/.pnpm/prettier@2.8.8/node_modules/prettier/index.js:38114:65)
at Object.load [as loadPlugins] (/Users/furthur/Projects/_anadea/rocky-ui-gitlab/node_modules/.pnpm/prettier@2.8.8/node_modules/prettier/index.js:16147:23)
at /Users/furthur/Projects/_anadea/rocky-ui-gitlab/node_modules/.pnpm/prettier@2.8.8/node_modules/prettier/index.js:38181:24
at Object.format (/Users/furthur/Projects/_anadea/rocky-ui-gitlab/node_modules/.pnpm/prettier@2.8.8/node_modules/prettier/index.js:38197:12)
at /Users/furthur/.vscode/extensions/rvest.vs-code-prettier-eslint-5.1.0/dist/extension.js:189:131
at zme (/Users/furthur/.vscode/extensions/rvest.vs-code-prettier-eslint-5.1.0/dist/extension.js:185:1460)
@dvakatsiienko I wonder if the issue is that you are using PNPM as your package manager. Can you use the pretter
CLI and see if you get the same error?
@idahogurl I've tried to wipe out pnpm
and use yarn
with same configuration, it produces same error.
This issue is stale because it has been open for 14 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
I have the same error. Any recommendations?
I've had some success with this wrapping the plugins with require.resolve
See https://github.com/prettier/prettier/issues/13276
Describe the bug Extension errors out with
Error: Cannot find module 'prettier-plugin-tailwindcss'
whenprettier-plugin-tailwindcss
is added as a plugin to.prettierrc.js
.To Reproduce Steps to reproduce the behavior:
npm i prettier-plugin-tailwindcss
prettier-plugin-tailwindcss
as a plugin to.prettierrc.js
Prettier ESLint
Error: Cannot find module 'prettier-plugin-tailwindcss'
Expected behavior Extension should support simple tailwind plugin for class sorting.
Example Prettier Config
Screenshots![Screenshot 2023-08-25 at 16 58 52@2x](https://github.com/idahogurl/vs-code-prettier-eslint/assets/15727958/dcfd6458-11e9-4d8a-b15d-06545ac242b7)
Versions (please complete the following information):
System Specifications (please complete the following information):