can i use this with `prettier-plugin-tailwindcss`
hyoban opened this issue ยท comments
i have already installed @iconify-json/mdi
["INFO" - 5:30:18 PM] Formatting file:///home/hyoban/personal/blog-next-notion/tailwind.config.js
["INFO" - 5:30:18 PM] Using config file at '/home/hyoban/personal/blog-next-notion/.prettierrc.cjs'
["INFO" - 5:30:18 PM] Using ignore file (if present) at /home/hyoban/personal/blog-next-notion/.prettierignore
["INFO" - 5:30:18 PM] File Info:
{
"ignored": false,
"inferredParser": "babel"
}
["INFO" - 5:30:18 PM] Detected local configuration (i.e. .prettierrc or .editorconfig), VS Code configuration will not be used
["INFO" - 5:30:18 PM] Prettier Options:
{
"filepath": "/home/hyoban/personal/blog-next-notion/tailwind.config.js",
"parser": "babel",
"useTabs": false,
"tabWidth": 2,
"printWidth": 80,
"endOfLine": "lf",
"semi": false,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"bracketSameLine": true,
"arrowParens": "always",
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "css",
"vueIndentScriptAndStyle": false,
"embeddedLanguageFormatting": "auto",
"singleAttributePerLine": false,
"plugins": [
{
"options": {
"tailwindConfig": {
"type": "string",
"category": "Tailwind CSS",
"description": "TODO"
}
},
"parsers": {
"html": {
"astFormat": "html"
},
"glimmer": {
"astFormat": "glimmer"
},
"lwc": {
"astFormat": "html"
},
"angular": {
"astFormat": "html"
},
"vue": {
"astFormat": "html"
},
"css": {
"astFormat": "postcss"
},
"scss": {
"astFormat": "postcss"
},
"less": {
"astFormat": "postcss"
},
"babel": {
"astFormat": "estree"
},
"babel-flow": {
"astFormat": "estree"
},
"flow": {
"astFormat": "estree"
},
"typescript": {
"astFormat": "estree"
},
"babel-ts": {
"astFormat": "estree"
},
"espree": {
"astFormat": "estree"
},
"meriyah": {
"astFormat": "estree"
},
"__js_expression": {
"astFormat": "estree"
}
},
"printers": {}
}
]
}
["ERROR" - 5:30:18 PM] Error formatting document.
["ERROR" - 5:30:18 PM] Icon collection "mdi" not found. Please install @iconify-json/mdi or @iconify/json
Error: Icon collection "mdi" not found. Please install @iconify-json/mdi or @iconify/json
at /home/hyoban/personal/blog-next-notion/node_modules/.pnpm/@egoist+tailwindcss-icons@1.0.3_tailwindcss@3.2.4/node_modules/@egoist/tailwindcss-icons/dist/index.js:62:17
at Array.reduce (<anonymous>)
at getIconCollections (/home/hyoban/personal/blog-next-notion/node_modules/.pnpm/@egoist+tailwindcss-icons@1.0.3_tailwindcss@3.2.4/node_modules/@egoist/tailwindcss-icons/dist/index.js:56:22)
at Object.<anonymous> (/home/hyoban/personal/blog-next-notion/tailwind.config.js:16:20)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.r._load (/home/hyoban/.vscode-server/bin/441438abd1ac652551dbe4d408dfcec8a499b8bf/out/vs/workbench/api/node/extensionHostProcess.js:122:13360)
at Function.g._load (/home/hyoban/.vscode-server/bin/441438abd1ac652551dbe4d408dfcec8a499b8bf/out/vs/workbench/api/node/extensionHostProcess.js:117:62400)
at Function.E._load (/home/hyoban/.vscode-server/bin/441438abd1ac652551dbe4d408dfcec8a499b8bf/out/vs/workbench/api/node/extensionHostProcess.js:117:61793)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at rb.exports (/home/hyoban/personal/blog-next-notion/node_modules/.pnpm/prettier-plugin-tailwindcss@0.2.2_prettier@2.8.3/node_modules/prettier-plugin-tailwindcss/dist/index.js:129:2647)
at Object.parse (/home/hyoban/personal/blog-next-notion/node_modules/.pnpm/prettier-plugin-tailwindcss@0.2.2_prettier@2.8.3/node_modules/prettier-plugin-tailwindcss/dist/index.js:134:4583)
at Object.parse (/home/hyoban/personal/blog-next-notion/node_modules/.pnpm/prettier@2.8.3/node_modules/prettier/index.js:7515:23)
at coreFormat (/home/hyoban/personal/blog-next-notion/node_modules/.pnpm/prettier@2.8.3/node_modules/prettier/index.js:8829:18)
at formatWithCursor2 (/home/hyoban/personal/blog-next-notion/node_modules/.pnpm/prettier@2.8.3/node_modules/prettier/index.js:9021:18)
at /home/hyoban/personal/blog-next-notion/node_modules/.pnpm/prettier@2.8.3/node_modules/prettier/index.js:38168:12
at Object.format (/home/hyoban/personal/blog-next-notion/node_modules/.pnpm/prettier@2.8.3/node_modules/prettier/index.js:38182:12)
at t.default.format (/home/hyoban/.vscode-server/extensions/esbenp.prettier-vscode-9.10.4/dist/extension.js:1:14669)
at t.PrettierEditProvider.provideEdits (/home/hyoban/.vscode-server/extensions/esbenp.prettier-vscode-9.10.4/dist/extension.js:1:11355)
at z.provideDocumentFormattingEdits (/home/hyoban/.vscode-server/bin/441438abd1ac652551dbe4d408dfcec8a499b8bf/out/vs/workbench/api/node/extensionHostProcess.js:98:39748)
["INFO" - 5:30:18 PM] Formatting completed in 16ms.
as the error suggests, you need to install oh, i see, will look into this@iconify-json/mdi
(just mdi collection) or @iconify/json
(full icon collections, 50MB)
๐ This issue has been resolved in version 1.0.4 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐
I'm still having this issue even in 1.0.7
When I comment the prettier-plugin-tailwindcss inside my prettierrc file, it works but with that it doesn't.
Same here. Once the prettier plugin from tailwindcss is ionstalled, I cant format the code
try the latest version instead, should be fixed
@egoist Thank you. I can confirm that this fix is working.