Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storybook 8 compatibility #112

Closed
joevaugh4n opened this issue Feb 21, 2024 · 16 comments
Closed

Storybook 8 compatibility #112

joevaugh4n opened this issue Feb 21, 2024 · 16 comments

Comments

@joevaugh4n
Copy link

Hey @jeanfredrik! I’m reaching out from the core SB team :)

Storybook 8 (our next major release) is coming soon, and it introduces some breaking changes that your addon might need to account for.

We’ve listed all the key changes in a new Storybook 8 migration guide, and we’d encourage you to check it out and see if your addon is impacted.

We also have an addons channel in our Discord community, which we’d like to use to better communicate with addon authors in the future. If you’re not part of the server, consider joining here and message me (@joevaugh4n) so that I can give you the addon creator role! If you’re already in the server, please just ping me and I’ll respond to you there.

Thanks for being a part of our addon community!

Joe

@JamesIves
Copy link

This is incompatible after the version 8 update.

@dgonzalezr
Copy link

Not sure if this plugin is still maintained. There is a pull request pending from months to update to Prettier 3 and still nothing, so, I assume this request will also be held 😕

@soullivaneuh
Copy link

This is incompatible after the version 8 update.

@JamesIves What do you mean by incompatible? I indeed have the following warning message:

WARN The following packages are incompatible with Storybook 8.0.0 as they depend on different major versions of Storybook packages:
WARN - @whitespace/[email protected]

However, the plugin looks to do is job by showing the html source code of the rendered componenent.

@JamesIves
Copy link

That warning is what I'm referring to.

@jbascue
Copy link

jbascue commented Mar 15, 2024

Despite the error/warning message, this addon still appears to work correctly in Storybook V8.
I'm hesitant to use this in a production environment, though.

@jeanfredrik
Copy link
Member

Hello everyone!
Sorry for not taking a look at this. I will look into it now.

@jeanfredrik
Copy link
Member

We just released version 6.0.0 which uses Storybook 8 and Prettier 3. Please try to update to the latest version and see if everything works.

@francescocaveglia
Copy link

Hi @jeanfredrik

storybook is failing with error

Storybook failed to load the following preset: /my-project/.storybook/main.ts.
Please check whether your setup is correct, the Storybook dependencies (and their peer dependencies) are installed correctly and there are no package version clashes.
If you believe this is a bug, please open an issue on Github.
SB_CORE-SERVER_0002 (CriticalPresetLoadError): Storybook failed to load the following preset: /my-project/node_modules/@whitespace/storybook-addon-html.
Please check whether your setup is correct, the Storybook dependencies (and their peer dependencies) are installed correctly and there are no package version clashes.
If you believe this is a bug, please open an issue on Github.
SB_CORE-SERVER_0002 (CriticalPresetLoadError): Storybook failed to load the following preset: /my-project/node_modules/@whitespace/storybook-addon-html/preset.js.
Please check whether your setup is correct, the Storybook dependencies (and their peer dependencies) are installed correctly and there are no package version clashes.
If you believe this is a bug, please open an issue on Github.
Error: Cannot find module './dist/preset.cjs'

'./dist/preset.cjs' is referenced in package.json but not present in node_modules

@jeanfredrik
Copy link
Member

jeanfredrik commented Mar 25, 2024

Seems it was built incorrectly before publishing. Try again now with v6.0.1

@francescocaveglia
Copy link

File still missing. Same error.

@jeanfredrik
Copy link
Member

Thank you for the fast feedback. I removed the reference to the preset in package.json now and published v6.0.2. Hope it works for you!

@francescocaveglia
Copy link

Sorry to bother but seems that v6.0.2 is not published

npm info @whitespace/storybook-addon-html

@whitespace/[email protected] | AGPL-3.0-or-later | deps: none | versions: 28
A Storybook addon that extracts and displays compiled syntax-highlighted HTML
https://github.com/whitespace-se/storybook-addon-html#readme

keywords: storybook-addon, html, code, popular, storybook-addons

dist
.tarball: https://registry.npmjs.org/@whitespace/storybook-addon-html/-/storybook-addon-html-6.0.1.tgz
.shasum: 99fbd126a2d1fef9269dce552eb0fd7879ccce26
.integrity: sha512-JVAaztF/TYNiPJE5z03q6YMQJFuj0TOK6NXR7RvFVMdOLWecv3oKwh8qQOXy7QYEmQXBR6QhElaow14GPm0Igg==
.unpackedSize: 27.4 kB

maintainers:
- olofsandell <[email protected]>
- christina.grannas <[email protected]>
- ynwuay <[email protected]>
- tsubarah <[email protected]>
- jeanfredrik <[email protected]>
- whitespace-se <[email protected]>
- pbrotherton <[email protected]>
- johan-westin <[email protected]>
- degeer <[email protected]>

dist-tags:
latest: 6.0.1  

published 3 hours ago by jeanfredrik <[email protected]>

@jeanfredrik
Copy link
Member

Sorry, it is published now.

@francescocaveglia
Copy link

Unfortunately I still see the same error on module.exports = require("./dist/preset.cjs");

@jeanfredrik
Copy link
Member

What is your config?

@francescocaveglia
Copy link

Hi @jeanfredrik
the issue was with the getAbsolutePath function (suggested by storybook).
Removed it (not really needed in our project) and now works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants