Open valentinpalkovic opened 1 month ago
@valentinpalkovic Thanks for looking into this! I have personally been experimenting with next@15 with storybook (using webpack under the hood), and the only major issue I'm running into is the invalid paths that @storybook/nextjs
tries to use when accessing server-related internals on next.js.
If this sounds familiar to you, that's because I've opened a related issue #29380 some days ago... but I've had time to fully try to debug the issue today and finally found the root cause + create a reproducible example for you to work with.
Apologies in advance if I end up hijacking/derailing the purpose of this ticket, feel free to remove this comment so the issue stays on track 👍
Hi @terrymun
Thank you very much for providing this detailed information! We will take a look as soon as we are able to work on this issue.
@valentinpalkovic Really appreciate your work with keeping Storybook updated with the latest release of next :) thanks for the update! If you need any further examples or need us to test something out for you, feel free to reach out.
For the Next15 release. It looks like the next/dist/client/components/headers file was moved to next/headers
I also encountered this issue with Next.js 15 and Storybook/Next.js. I hope it gets resolved quickly.
I tried created a minimal reproduction to start exploring this compatibility, but until official ^15.0.0
support lands, resolution errors prevent a clean install. Of course we could override, but I'm using this as a clear indicator to wait until maintainers can help.
cc https://github.com/nodejs/nodejs.org/pull/7155
Hey everyone! Next.js 15 support has landed in Storybook v8.4.3 as well as Storybook v8.5.0-alpha.4. Please give it a try and provide us feedback <3
We will do more investigations about the other topics mentioned in this issue, but you should be able to use Next.js 15 with Storybook now!
@yannbf Can confirm this is working great for us :)
does next.config.ts
work out of box? if no, what's workaround
does
next.config.ts
work out of box? if no, what's workaround
In .storybook/main.ts
:
framework: {
name: "@storybook/nextjs",
options: {
nextConfigPath: path.resolve(__dirname, "../next.config.ts"),
},
},
Describe the bug
Next.js 15 is now stable.
Investigate the following topics:
next/dynamic
in Storybook