Skip to content

Storybook works locally but not when deployed #35892

Description

@valentinpalkovic

Discussed in #33781

Originally posted by lsarni February 5, 2026

Summary

I'm migrating to Storybook v10 on Next.js v16, and it works locally, but on production all stories give the following error:

memo is not defined
The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:

Missing Context/Providers: You can use decorators to supply specific contexts or providers, which are sometimes necessary for components to render correctly. For detailed instructions on using decorators, please visit the [Decorators documentation](https://storybook.js.org/docs/writing-stories/decorators).
Misconfigured Webpack or Vite: Verify that Storybook picks up all necessary settings for loaders, plugins, and other relevant parameters. You can find step-by-step guides for configuring [Webpack](https://storybook.js.org/docs/builders/webpack) or [Vite](https://storybook.js.org/docs/builders/vite) with Storybook.
Missing Environment Variables: Your Storybook may require specific environment variables to function as intended. You can set up custom environment variables as outlined in the [Environment Variables documentation](https://storybook.js.org/docs/configure/environment-variables).

I can't find any previous references of this.

Additional information

No response

Create a reproduction

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugnextjssev:S2High priority. Fix within weeks.

    Type

    No type

    Projects

    Status
    Ready for work

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions