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
As Next.js RC for v15 has been released for testing, I'm investigating if it is possible to perform an upgrade of a Next.js app containing a storybook from next@14 to [email protected]. When attempting to build a storybook (using storybook build), I encounter this error:
Module not found: Error: Can't resolve 'next/dist/client/components/headers' in '/REDACTED_PATH_TO_REPO_ROOT/node_modules/@storybook/nextjs/dist/export-mocks/headers'
I suspect this is likely due to the breaking changes made to the folder structure inside node_modules/next/dist. The release candidate no longer has the nested folder structure the @storybook/nextjs depends on.
Interestingly, this cannot be reproduced by serving storybook locally, i.e. storybook dev -p 6006
Reproduction link
n/a
Reproduction steps
Running storybook build with next@15 release candidate should not fail with the message:
Module not found: Error: Can't resolve 'next/dist/client/components/headers' in '/REDACTED_PATH_TO_REPO_ROOT/node_modules/@storybook/nextjs/dist/export-mocks/headers'
Describe the bug
As Next.js RC for v15 has been released for testing, I'm investigating if it is possible to perform an upgrade of a Next.js app containing a storybook from
next@14
to[email protected]
. When attempting to build a storybook (usingstorybook build
), I encounter this error:I suspect this is likely due to the breaking changes made to the folder structure inside
node_modules/next/dist
. The release candidate no longer has the nested folder structure the@storybook/nextjs
depends on.Interestingly, this cannot be reproduced by serving storybook locally, i.e.
storybook dev -p 6006
Reproduction link
n/a
Reproduction steps
Running
storybook build
with next@15 release candidate should not fail with the message:I am unfortunately unable to reproduce this with an example from storybook.new, but I can confirm that inspecting the code in
@storybook/nextjs
does uncover statements that points to a file fornext@14
, but not to a file in[email protected]
: https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/src/export-mocks/headers/index.ts#L3C1-L6C53System
Additional context
No response
The text was updated successfully, but these errors were encountered: