Closed maddesigns closed 7 months ago
@maddesigns can you verify if you're using Prettier and which version do you have? Asking because I got the same when upgrading to Prettier v3.0.0, downgrading to Prettier v2.8.8 fixed it for me.
Confirmed @dgonzalezr. Works with Prettier v2.8.8 and Storybook 7.1 release.
I would really love to use this add-on but because of incompatibility with Prettier v3, we are unable to use it :( Any word from the maintainers if the Prettier version is planned for an update? Our team relies on some of the new features such as foreign language commenting styling and such for our team to maintain our pretty ✨ code. Awesome work from the team at @whitespace-dev! Thank you for the amazing addon.
I have the same problem. I'm using storybook 7.2.1
. Upgrading the prettier from 2.8.8
to 3
leads to the following errors:
SyntaxHighlighter.js:91
Uncaught TypeError: g.trim is not a function.standalone.mjs:22
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'languages').If I remove @whitespace/storybook-addon-html
there are no errors.
Downgrading to 2.8.8 doesn't always work because when I delete the /node_modules/.cache dir, Storybook is unabled to run and crashes with the following error:
prettier.resolveConfig.sync is not a function
Looking forward to this getting a fix. @jeanfredrik, any plans updating this any sooner? 🙂
For anyone running into this issue, I found another plugin that seems to work just the same that does not have the same conflicts with Prettier v3.
https://storybook.js.org/addons/@un-known/storybook-addon-html
I’m using your fantastic addon successfully with Storybook 7 Angular, but on Storybook 7.1 (beta) I’m getting following errors:
and
Maybe it’s dependencies related, but I can’t find out atm what to do.