You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've installed the prettier-plugin-hubl as described in the readme, but when I try to run prettier, I get the following error:
["ERROR" - 11:30:33 AM] Error formatting document.
["ERROR" - 11:30:33 AM] input.replace is not a function
TypeError: input.replace is not a function
at preserveFormatting ([path_to_my_folder]\node_modules\@hubspot\prettier-plugin-hubl\prettier\dist\index.js:135:19)
at Object.preprocess ([path_to_my_folder]\node_modules\@hubspot\prettier-plugin-hubl\prettier\dist\index.js:153:27)
at parse4 (file:///[path_to_my_folder]/node_modules/prettier/index.mjs:22113:43)
at async coreFormat (file:///[path_to_my_folder]/node_modules/prettier/index.mjs:22607:7)
at async formatWithCursor (file:///[path_to_my_folder]/node_modules/prettier/index.mjs:22809:14)
at async Module.format2 (file:///[path_to_my_folder]/node_modules/prettier/index.mjs:24194:25)
When I try to run yarn prettier --write my-project/**/*.html or npx prettier --write my-project/**/*.html,
or when I execute the automatic format in vscode, I get the error.
Additional context
Full error log:
npx prettier --write **/*.html
my-project/2 videos.module/module.html
[error] my-project/2 videos.module/module.html: TypeError: input.replace is not a function
[error] at preserveFormatting ([path_to_my_folder]\node_modules\@hubspot\prettier-plugin-hubl\prettier\dist\index.js:135:20)
[error] at Object.preprocess ([path_to_my_folder]\node_modules\@hubspot\prettier-plugin-hubl\prettier\dist\index.js:153:27)
[error] at parse4 (file:///[path_to_my_folder]/node_modules/prettier/index.mjs:22113:43)
[error] at async coreFormat (file:///[path_to_my_folder]/node_modules/prettier/index.mjs:22607:7)
[error] at async formatWithCursor (file:///[path_to_my_folder]/node_modules/prettier/index.mjs:22809:14)
[error] at async formatFiles (file:///[path_to_my_folder]/node_modules/prettier/internal/cli.mjs:6673:18)
[error] at async main (file:///[path_to_my_folder]/node_modules/prettier/internal/cli.mjs:7081:5)
[error] at async Module.run (file:///[path_to_my_folder]/node_modules/prettier/internal/cli.mjs:7027:5)
Checklist
I have checked the known issues to make sure this isn’t already a known issue.
The text was updated successfully, but these errors were encountered:
👋 Hi! I am not able to reproduce this issue. Your configuration looks all correct. Were you able to resolve this? If not, could you provide a snippet of the file that was causing this issue?
Description
I've installed the prettier-plugin-hubl as described in the readme, but when I try to run prettier, I get the following error:
Expected behavior
I want my html-hubl files to format
To Reproduce
package.json:
.prettierrc.json:
I also have a .vscode/settings.json set up:
When I try to run
yarn prettier --write my-project/**/*.html
ornpx prettier --write my-project/**/*.html
,or when I execute the automatic format in vscode, I get the error.
Additional context
Full error log:
Checklist
The text was updated successfully, but these errors were encountered: