NiklasPor / prettier-plugin-go-template

Fixes prettier formatting for go templates 🐹

Home Page:prettier-plugin-go-template-niklaspor.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error - Found invalid node block

reggieds opened this issue Β· comments

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"

Please provide the HTML template which caused this issue. Otherwise there's no way to debug this πŸ‘

Would you mind adding which version of prettier-plugin-go-template you have installed as well?

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

Error gone after I reinstall my vscode prettier extension. Thanks all.

good luck then πŸ‘