Skip to content

[Bug] Storybook failed to load the following preset: @storybook/nextjs-vite/preset. #49

@ariesclark

Description

@ariesclark

Steps to reproduce the behavior

pnpm create storybook@latest

Screenshots and/or logs

> storybook dev -p 6006 "--initial-path=/onboarding" "--quiet"

storybook v9.0.16

SB_CORE-SERVER_0002 (CriticalPresetLoadError): Storybook failed to load the following preset: @storybook/nextjs-vite/preset.

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.

./node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-DPTTEEJb.js:18352
const __dirname = import_node_path.default.dirname((0, import_node_url.fileURLToPath)(__esbuild_register_import_meta_url__));
      ^

SyntaxError: Identifier '__dirname' has already been declared
    at wrapSafe (node:internal/modules/cjs/loader:1378:20)
    at Module._compile (node:internal/modules/cjs/loader:1428:41)
    at extensions..js (./node_modules/.pnpm/[email protected][email protected]/node_modules/esbuild-register/dist/node.js:4840:15)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (./node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/vite/dist/node/index.js:2:696)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at extensions..js (./node_modules/.pnpm/[email protected][email protected]/node_modules/esbuild-register/dist/node.js:4840:15)

Environment

Next.js 15.3.1-canary.8
pnpm 9.14.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions