Skip to content

Error formatting document #11

@rbluethl

Description

@rbluethl

Hey there! I'm getting this error in the VS code output console when trying to format a rather large .vue file. (SFC with script setup). I tried a bunch of files and this one isn't formatting properly, all others work super smooth. I can't share the exact file but I can provide some more details if necessary.

prettier version: 2.5.1
prettier-plugin-tailwindcss version: 0.1.3
tailwindcss version: 3.0.16

["ERROR" - 8:15:05 AM] Error formatting document.
TypeError: Cannot read property 'includes' of null
    at Lr (/Users/.../node_modules/prettier-plugin-tailwindcss/dist/index.js:145:943)
    at n (/Users/.../node_modules/prettier-plugin-tailwindcss/dist/index.js:145:2520)
    at n (/Users/.../node_modules/prettier-plugin-tailwindcss/dist/index.js:145:2956)
    at n (/Users/.../node_modules/prettier-plugin-tailwindcss/dist/index.js:145:2956)
    at n (/Users/.../node_modules/prettier-plugin-tailwindcss/dist/index.js:145:2956)
    at n (/Users/.../node_modules/prettier-plugin-tailwindcss/dist/index.js:145:2956)
    at Object.parse (/Users/.../node_modules/prettier-plugin-tailwindcss/dist/index.js:145:2363)
    at Object.parse$d [as parse] (/Users/.../node_modules/prettier/index.js:12975:19)
    at coreFormat (/Users/.../node_modules/prettier/index.js:14525:16)
    at formatWithCursor$1 (/Users/.../node_modules/prettier/index.js:14765:14)
    at /Users/.../node_modules/prettier/index.js:60959:12
    at Object.Success [as format] (/Users/.../node_modules/prettier/index.js:60979:12)
    at t.default.<anonymous> (/Users/.../.vscode/extensions/esbenp.prettier-vscode-9.1.0/src/PrettierEditService.ts:435:45)
    at Generator.next (<anonymous>)
    at s (/Users/.../.vscode/extensions/esbenp.prettier-vscode-9.1.0/dist/extension.js:1:7872)

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