Error - Found invalid node block
reggieds opened this issue Β· comments
Reggie commented
I've got this error while reformat using prettier on Hugo HTML document.
["INFO" - 7:41:36 PM] Extension Name: esbenp.prettier-vscode.
["INFO" - 7:41:36 PM] Extension Version: 9.5.0.
["INFO" - 7:41:42 PM] File Info:
{
"ignored": false,
"inferredParser": "go-template"
}
["ERROR" - 9:41:22 PM] Error formatting document.
["ERROR" - 9:41:22 PM] An error occured during printing. Found invalid node block.
Error: An error occured during printing. Found invalid node block.
at Object.print (/usr/local/lib/node_modules/prettier-plugin-go-template/src/index.ts:89:13)
at callPluginPrintFunction (/usr/local/lib/node_modules/prettier/index.js:8447:26)
My VSCode settings:
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"prettier.prettierPath": "/usr/local/lib/node_modules/prettier"
Niklas commented
Please provide the HTML template which caused this issue. Otherwise there's no way to debug this π
Caleb Jasik commented
Would you mind adding which version of prettier-plugin-go-template
you have installed as well?
Reggie commented
Would you mind adding which version of
prettier-plugin-go-template
you have installed as well?
My prettier-plugin-go-template
package version:
npm list -g --depth=0
/usr/local/lib
βββ @nestjs/cli@8.2.5
βββ bower@1.8.14
βββ gatsby-cli@4.12.1
βββ gulp-cli@2.3.0
βββ npm@8.7.0
βββ prettier-plugin-go-template@0.0.12
βββ prettier@2.6.2
βββ yo@4.3.0
Reggie commented
Error gone after I reinstall my vscode prettier extension. Thanks all.
Caleb Jasik commented
good luck then π