question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Comment 'x' was not printed

See original GitHub issue

Summary

If my React TypeScript file has comments, prettier-vscode exits with error, blaming Prettier

Just like: #1552 Plot twist: https://github.com/prettier/prettier/issues/10592

and now I’m confused

Actual result

["INFO" - 12:24:50 PM] Formatting /redacted.tsx
["INFO" - 12:24:50 PM] Using config file at '/redacted/.prettierrc'
["INFO" - 12:24:50 PM] Using ignore file (if present) at /redacted/.prettierignore
["INFO" - 12:24:50 PM] File Info:
{
  "ignored": false,
  "inferredParser": "typescript"
}
["INFO" - 12:24:50 PM] Detected local configuration (i.e. .prettierrc or .editorconfig), VS Code configuration will not be used
["INFO" - 12:24:50 PM] Prettier Options:
{
  "filepath": "/redacted.tsx",
  "parser": "typescript",
  "useTabs": false,
  "tabWidth": 2,
  "singleQuote": true,
  "semi": true,
  "trailingComma": "all",
  "printWidth": 120
}
["ERROR" - 12:24:50 PM] Error formatting document.
["ERROR" - 12:24:50 PM] Comment "Third Parties" was not printed. Please report this error!
Error: Comment "Third Parties" was not printed. Please report this error!
	at /redacted/node_modules/prettier/index.js:14753:13
	at Array.forEach (<anonymous>)
	at ensureAllCommentsPrinted (/redacted/node_modules/prettier/index.js:14751:15)
	at coreFormat (/redacted/node_modules/prettier/index.js:14799:3)
	at format (/redacted/node_modules/prettier/index.js:15017:75)
	at formatWithCursor (/redacted/node_modules/prettier/index.js:15033:12)
	at /redacted/node_modules/prettier/index.js:50675:12
	at Object.format (/redacted/node_modules/prettier/index.js:50695:12)
	at t.default.<anonymous> (/redacted/.vscode/extensions/esbenp.prettier-vscode-6.3.1/dist/extension.js:1:16946)
	at Generator.next (<anonymous>)
	at s (/redacted/.vscode/extensions/esbenp.prettier-vscode-6.3.1/dist/extension.js:1:9119)
["INFO" - 12:24:50 PM] Formatting completed in 35.601617ms.

Additional information

VS Code Version: 1.54.3

Prettier Extension Version: v6.3.1

OS and version: macOS 11.2.3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
thorn0commented, Mar 27, 2021

Yeah, Prettier guys replied the same about this repo

That didn’t happen though.

1reaction
trumbittacommented, Mar 26, 2021

I reloaded the window (Developer: reload window) and the error vanished. 🤷

Read more comments on GitHub >

github_iconTop Results From Across the Web

Comment "x" was not printed. Please report this error! #10592
Environments: Prettier Version: 2.2.1 (This does not seem to be an issue in 2.0.5) Running Prettier via: VSCode/CLI Runtime: Typescript ...
Read more >
Comments not printing in MS Word 2013 - Microsoft Community
My comments are not printing in MS Word 2013. They are showing up in Print Preview, I have "Print Mark Up" selected. When...
Read more >
Print comments | Acrobat, Reader - Adobe Support
Open the pop-up comments that you want to print. Adjust their placement on the page so that they don't overlap or spill off...
Read more >
Photon Mono X not printing anything : r/AnycubicPhoton - Reddit
PLEASE UPVOTE THIS COMMENT IF THE ANSWER CAN BE FOUND IN THE BEGINNER'S GUIDE or the FAQ! If your post is about Troubleshooting,...
Read more >
python 3.x - docopt not printing arguments - Stack Overflow
This is the reason docopt was not able to parse my inputs. ... or change the usage comment and provide my input in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found