Repository: storybook
Issue: [Bug]: Storybook has stopped loading TypeError: (0 , import_common.handlebars) is not a function
Labels: bug,dependencies,has workaround

### Describe the bug

Storybook has been working fine for me for weeks, until today. No new changes. Now it refuses to start.

I have tried `storybook dev -p 6006` and `npx storybook@latest init`, I have also cleared my node modules and reinstalled.

```
> storybook dev --no-open --quiet -p 6006

@storybook/core v8.4.2

WARN The following packages are incompatible with Storybook 8.4.2 as they depend on different major versions of Storybook packages:
WARN - @storybook/addon-essentials@8.2.9 (8.4.2 available!)
WARN  Repo: https://github.com/storybookjs/storybook/tree/next/code/addons/essentials
WARN - @storybook/addon-interactions@8.2.9 (8.4.2 available!)
WARN  Repo: https://github.com/storybookjs/storybook/tree/next/code/addons/interactions
WARN - @storybook/nextjs@8.2.9 (8.4.2 available!)
WARN  Repo: https://github.com/storybookjs/storybook/tree/next/code/frameworks/nextjs
WARN - @storybook/react@8.2.9 (8.4.2 available!)
WARN  Repo: https://github.com/storybookjs/storybook/tree/next/code/renderers/react
WARN - @storybook/test@8.2.9 (8.4.2 available!)
WARN  Repo: https://github.com/storybookjs/storybook/tree/next/code/lib/test
WARN Please consider updating your packages or contacting the maintainers for compatibility details.
WARN For more on Storybook 8 compatibility, see the linked GitHub issue:
WARN https://github.com/storybookjs/storybook/issues/26031

info Found existing addon "@storybook/addon-controls", skipping.
info Found existing addon "@storybook/addon-viewport", skipping.
info Found existing addon "@storybook/addon-controls", skipping.
info Found existing addon "@storybook/addon-viewport", skipping.
info => Serving static files from ././public at /
=> Failed to build the preview
TypeError: (0 , import_common.handlebars) is not a function
    at getVirtualModules (./node_modules/@storybook/builder-webpack5/dist/presets/preview-preset.js:1:3007)
    at async iframe_webpack_config_default (./node_modules/@storybook/builder-webpack5/dist/presets/preview-preset.js:6:222)
    at async starter (./node_modules/@storybook/builder-webpack5/dist/index.js:1:6115)
    at async Module.start (./node_modules/@storybook/builder-webpack5/dist/index.js:1:9902)
    at async storybookDevServer (./node_modules/@storybook/core/dist/core-server/index.cjs:36000:11)
    at async buildOrThrow (./node_modules/@storybook/core/dist/core-server/index.cjs:35017:12)
    at async buildDevStandalone (./node_modules/@storybook/core/dist/core-server/index.cjs:37190:78)
    at async withTelemetry (./node_modules/@storybook/core/dist/core-server/index.cjs:35757:12)
    at async dev (./node_modules/@storybook/core/dist/cli/bin/index.cjs:2591:3)
    at async s.<anonymous> (./node_modules/@storybook/core/dist/cli/bin/index.cjs:2643:74)

WARN Broken build, fix the error above.
WARN You may need to refresh the browser.
```

### Reproduction link

 None 

### Reproduction steps

_No response_

### System

System:
    OS: macOS 14.7.1
    CPU: (10) arm64 Apple M1 Max
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.9.0 - ~/.nvm/versions/node/v22.9.0/bin/node
    Yarn: 4.4.0 - /opt/homebrew/bin/yarn <----- active
    npm: 10.8.3 - ~/.nvm/versions/node/v22.9.0/bin/npm
  Browsers:
    Chrome: 130.0.6723.92
    Safari: 17.6
  npmPackages:
    @storybook/addon-essentials: ^8.2.9 => 8.2.9
    @storybook/addon-interactions: ^8.2.9 => 8.2.9
    @storybook/addon-links: ^8.2.9 => 8.2.9
    @storybook/addon-onboarding: ^8.2.9 => 8.2.9
    @storybook/blocks: ^8.2.9 => 8.2.9
    @storybook/nextjs: ^8.2.9 => 8.2.9
    @storybook/react: ^8.2.9 => 8.2.9
    @storybook/test: ^8.2.9 => 8.2.9
    @storybook/types: ^8.2.9 => 8.2.9
    eslint-plugin-storybook: ^0.8.0 => 0.8.0
    msw-storybook-addon: ^2.0.4 => 2.0.4
    storybook: ^8.2.9 => 8.4.2

### Additional context

_No response_