Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SV CLI with storybook not working correctly SB_CORE-SERVER_0002 (CriticalPresetLoadError): Storybook failed to load the following preset @[email protected] #379

Closed
good-dev-student opened this issue Dec 28, 2024 · 2 comments
Labels
bug Something isn't working upstream

Comments

@good-dev-student
Copy link

OS Name: Microsoft Windows 11 Pro OS Version: 10.0.22631 N/A Build 22631
node -v: v23.5.0
pnpm -v: 9.15.1

CLI log:

$ npx sv@latest create sv-cli-storybook-issue
┌  Welcome to the Svelte CLI! (v0.6.10)
│
◇  Which template would you like?
│  SvelteKit minimal
│
◇  Add type checking with Typescript?
│  Yes, using Typescript syntax
│
◆  Project created
│
◇  What would you like to add to your project? (use arrow keys / space bar)
│  prettier, eslint, vitest, playwright, tailwindcss, sveltekit-adapter, drizzle, lucia, mdsvex, paraglide, storybook
│
◇  tailwindcss: Which plugins would you like to add?
│  typography, forms, container-queries
│
◇  sveltekit-adapter: Which SvelteKit adapter would you like to use?
│  node
│
◇  drizzle: Which database would you like to use?
│  PostgreSQL
│
◇  drizzle: Which PostgreSQL client would you like to use?
│  Postgres.JS
│
◇  drizzle: Do you want to run the database locally with docker-compose?
│  Yes
│
◇  lucia: Do you want to include a demo? (includes a login/register page)
│  Yes
│
◇  paraglide: Which languages would you like to support? (e.g. en,de-ch)
│  en,fr,it,de
│
◇  paraglide: Do you want to include a demo?
│  Yes
│
◇  Which package manager do you want to install dependencies with?
│  pnpm
│
◇  storybook: Running external command (pnpm dlx storybook@latest init --skip-install --no-dev)
╭──────────────────────────────────────────────────────╮
│                                                      │
│   Adding Storybook version 8.4.7 to your project..   │
│                                                      │
╰──────────────────────────────────────────────────────╯
 • Detecting project type. ✓
 • Adding Storybook support to your "SvelteKit" app
  ✔ Getting the correct version of 9 packages
    Configuring eslint-plugin-storybook in your package.json
  ✔ Installing Storybook dependencies
. ✓

attention => Storybook now collects completely anonymous telemetry regarding usage.
This information is used to shape Storybook's roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://storybook.js.org/telemetry

╭──────────────────────────────────────────────────────────────────────────────╮
│                                                                              │
│   Storybook was successfully installed in your project! 🎉                   │
│   To run Storybook manually, run pnpm run storybook. CTRL+C to stop.         │
│                                                                              │
│   Wanna know more about Storybook? Check out https://storybook.js.org/       │
│   Having trouble or want to chat? Join us at https://discord.gg/storybook/   │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
│
◆  Successfully setup add-ons
│
◆  Successfully installed dependencies
│
◇  Successfully formatted modified files
│
◇  Project next steps ─────────────────────────────────────────────────────╮
│                                                                          │
│  1: cd sv-cli-storybook-issue                                            │
│  2: git init && git add -A && git commit -m "Initial commit" (optional)  │
│  3: pnpm run dev --open                                                  │
│                                                                          │
│  To close the dev server, hit Ctrl-C                                     │
│                                                                          │
│  Stuck? Visit us at https://svelte.dev/chat                              │
│                                                                          │
├──────────────────────────────────────────────────────────────────────────╯
│
◇  Add-on next steps ──────────────────────────────────────────────────╮
│                                                                      │
│  drizzle:                                                            │
│  - You will need to set DATABASE_URL in your production environment  │
│  - Run pnpm run db:start to start the docker container               │
│  - Run pnpm run db:push to update your database schema               │
│                                                                      │
│  lucia:                                                              │
│  - Run pnpm run db:push to update your database schema               │
│  - Visit /demo/lucia route to view the demo                          │
│                                                                      │
│  paraglide:                                                          │
│  - Edit your messages in messages/en.json                            │
│  - Consider installing the Sherlock IDE Extension                    │
│  - Visit /demo/paraglide route to view the demo                      │
│                                                                      │
├──────────────────────────────────────────────────────────────────────╯
│
└  You're all set!

pNPM dev:

> [email protected] dev C:\test\sv-cli-storybook-issue
> vite dev

▲ [WARNING] Cannot find base config file "./.svelte-kit/tsconfig.json" [tsconfig.json]

    tsconfig.json:2:12:
      2 │   "extends": "./.svelte-kit/tsconfig.json",
        ╵              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Using existing cloned repo
ℹ [paraglide] Compiling Messages into ./src/lib/paraglide
Forced re-optimization of dependencies

  VITE v5.4.11  ready in 4371 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help

pNPM run storybook:

> [email protected] storybook C:\test\sv-cli-storybook-issue
> storybook dev -p 6006

@storybook/core v8.4.7

SB_CORE-SERVER_0002 (CriticalPresetLoadError): Storybook failed to load the following preset: .\.storybook\main.js.

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.

SB_CORE-SERVER_0002 (CriticalPresetLoadError): Storybook failed to load the following preset: .\node_modules\.pnpm\@[email protected]_@[email protected][email protected]_prettier@3._invney3l7qorapowne6u3rqdru\node_modules\@storybook\addon-svelte-csf\dist\preset.js.

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.

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.\node_modules\.pnpm\@[email protected]_@[email protected][email protected]_prettier@3._invney3l7qorapowne6u3rqdru\node_modules\@storybook\addon-svelte-csf\dist\utils\identifier-utils' imported from .\node_modules\.pnpm\@[email protected]_@[email protected][email protected]_prettier@3._invney3l7qorapowne6u3rqdru\node_modules\@storybook\addon-svelte-csf\dist\compiler\pre-transform\codemods\legacy-story.js
    at finalizeResolution (node:internal/modules/esm/resolve:275:11)
    at moduleResolve (node:internal/modules/esm/resolve:860:10)
    at defaultResolve (node:internal/modules/esm/resolve:984:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:688:12)
    at #cachedDefaultResolve (node:internal/modules/esm/loader:612:25)
    at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:647:38)
    at ModuleLoader.resolveSync (node:internal/modules/esm/loader:670:52)
    at #cachedResolveSync (node:internal/modules/esm/loader:631:25)
    at ModuleLoader.getModuleJobForRequire (node:internal/modules/esm/loader:359:50)
    at new ModuleJobSync (node:internal/modules/esm/module_job:342:34)

More info:

    at loadPreset (.\node_modules\.pnpm\@[email protected][email protected]\node_modules\@storybook\core\dist\common\index.cjs:16477:13)

More info:

    at loadPreset (.\node_modules\.pnpm\@[email protected][email protected]\node_modules\@storybook\core\dist\common\index.cjs:16477:13)
    at async Promise.all (index 1)
    at async loadPresets (.\node_modules\.pnpm\@[email protected][email protected]\node_modules\@storybook\core\dist\common\index.cjs:16487:55)
    at async getPresets (.\node_modules\.pnpm\@[email protected][email protected]\node_modules\@storybook\core\dist\common\index.cjs:16520:11)
    at async buildDevStandalone (.\node_modules\.pnpm\@[email protected][email protected]\node_modules\@storybook\core\dist\core-server\index.cjs:37145:11)
    at async withTelemetry (.\node_modules\.pnpm\@[email protected][email protected]\node_modules\@storybook\core\dist\core-server\index.cjs:35757:12)
    at async dev (.\node_modules\.pnpm\@[email protected][email protected]\node_modules\@storybook\core\dist\cli\bin\index.cjs:2591:3)
    at async s.<anonymous> (.\node_modules\.pnpm\@[email protected][email protected]\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.

WARN   Failed to load preset: {"type":"presets","name":"C:\\test\\sv-cli-storybook-issue\\node_modules\\.pnpm\\@[email protected]_@[email protected][email protected]_prettier@3._invney3l7qorapowne6u3rqdru\\node_modules\\@storybook\\addon-svelte-csf\\dist\\preset.js"} on level 1
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.\node_modules\.pnpm\@[email protected]_@[email protected][email protected]_prettier@3._invney3l7qorapowne6u3rqdru\node_modules\@storybook\addon-svelte-csf\dist\utils\identifier-utils' imported from .\node_modules\.pnpm\@[email protected]_@[email protected][email protected]_prettier@3._invney3l7qorapowne6u3rqdru\node_modules\@storybook\addon-svelte-csf\dist\compiler\pre-transform\codemods\legacy-story.js
    at finalizeResolution (node:internal/modules/esm/resolve:275:11)
    at moduleResolve (node:internal/modules/esm/resolve:860:10)
    at defaultResolve (node:internal/modules/esm/resolve:984:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:688:12)
    at #cachedDefaultResolve (node:internal/modules/esm/loader:612:25)
    at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:647:38)
    at ModuleLoader.resolveSync (node:internal/modules/esm/loader:670:52)
    at #cachedResolveSync (node:internal/modules/esm/loader:631:25)
    at ModuleLoader.getModuleJobForRequire (node:internal/modules/esm/loader:359:50)
    at new ModuleJobSync (node:internal/modules/esm/module_job:342:34)
√ Would you like to help improve Storybook by sending anonymous crash reports? ... yes
 ELIFECYCLE  Command failed with exit code 1.

i have tried:

  1. Check Dependency Installation
    [ OK ] pnpm install

[ OK ] rm -rf node_modules
[ OK ] rm -f package-lock.json # Or pnpm-lock.yaml for pnpm
[ OK ] npm install
2. Clean the Project
i have used after : pnpm install --force

also i have tried : pnpm update -L

 WARN  9 deprecated subdependencies found: @esbuild-kit/[email protected], @esbuild-kit/[email protected], @humanwhocodes/[email protected], @humanwhocodes/[email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Packages: +19
+++++++++++++++++++
Progress: resolved 747, reused 625, downloaded 0, added 19, done

dependencies:
- @inlang/paraglide-sveltekit 0.11.5
+ @inlang/paraglide-sveltekit 0.15.0
- @node-rs/argon2 1.8.3
+ @node-rs/argon2 2.0.2
- drizzle-orm 0.33.0
+ drizzle-orm 0.38.3

devDependencies:
- @sveltejs/vite-plugin-svelte 4.0.4
+ @sveltejs/vite-plugin-svelte 5.0.3
- drizzle-kit 0.22.8
+ drizzle-kit 0.30.1
- mdsvex 0.11.2
+ mdsvex 0.12.3
- vite 5.4.11
+ vite 6.0.6

Done in 22.3s

same problem:

> [email protected] storybook C:\test\sv-cli-storybook-issue
> storybook dev -p 6006

@storybook/core v8.4.7

SB_CORE-SERVER_0002 (CriticalPresetLoadError): Storybook failed to load the following preset: .\.storybook\main.js.

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.

SB_CORE-SERVER_0002 (CriticalPresetLoadError): Storybook failed to load the following preset: .\node_modules\.pnpm\@[email protected]_@[email protected][email protected]_prettier@3._cf7nqnu6p5s3tdreqzupsb4qie\node_modules\@storybook\addon-svelte-csf\dist\preset.js.

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.

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.\node_modules\.pnpm\@[email protected]_@[email protected][email protected]_prettier@3._cf7nqnu6p5s3tdreqzupsb4qie\node_modules\@storybook\addon-svelte-csf\dist\utils\identifier-utils' imported from .\node_modules\.pnpm\@[email protected]_@[email protected][email protected]_prettier@3._cf7nqnu6p5s3tdreqzupsb4qie\node_modules\@storybook\addon-svelte-csf\dist\compiler\pre-transform\codemods\legacy-story.js
    at finalizeResolution (node:internal/modules/esm/resolve:275:11)
    at moduleResolve (node:internal/modules/esm/resolve:860:10)
    at defaultResolve (node:internal/modules/esm/resolve:984:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:688:12)
    at #cachedDefaultResolve (node:internal/modules/esm/loader:612:25)
    at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:647:38)
    at ModuleLoader.resolveSync (node:internal/modules/esm/loader:670:52)
    at #cachedResolveSync (node:internal/modules/esm/loader:631:25)
    at ModuleLoader.getModuleJobForRequire (node:internal/modules/esm/loader:359:50)
    at new ModuleJobSync (node:internal/modules/esm/module_job:342:34)

More info:

    at loadPreset (.\node_modules\.pnpm\@[email protected][email protected]\node_modules\@storybook\core\dist\common\index.cjs:16477:13)

More info:

    at loadPreset (.\node_modules\.pnpm\@[email protected][email protected]\node_modules\@storybook\core\dist\common\index.cjs:16477:13)
    at async Promise.all (index 1)
    at async loadPresets (.\node_modules\.pnpm\@[email protected][email protected]\node_modules\@storybook\core\dist\common\index.cjs:16487:55)
    at async getPresets (.\node_modules\.pnpm\@[email protected][email protected]\node_modules\@storybook\core\dist\common\index.cjs:16520:11)
    at async buildDevStandalone (.\node_modules\.pnpm\@[email protected][email protected]\node_modules\@storybook\core\dist\core-server\index.cjs:37145:11)
    at async withTelemetry (.\node_modules\.pnpm\@[email protected][email protected]\node_modules\@storybook\core\dist\core-server\index.cjs:35757:12)
    at async dev (.\node_modules\.pnpm\@[email protected][email protected]\node_modules\@storybook\core\dist\cli\bin\index.cjs:2591:3)
    at async s.<anonymous> (.\node_modules\.pnpm\@[email protected][email protected]\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.

WARN   Failed to load preset: {"type":"presets","name":"C:\\test\\sv-cli-storybook-issue\\node_modules\\.pnpm\\@[email protected]_@[email protected][email protected]_prettier@3._cf7nqnu6p5s3tdreqzupsb4qie\\node_modules\\@storybook\\addon-svelte-csf\\dist\\preset.js"} on level 1
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.\node_modules\.pnpm\@[email protected]_@[email protected][email protected]_prettier@3._cf7nqnu6p5s3tdreqzupsb4qie\node_modules\@storybook\addon-svelte-csf\dist\utils\identifier-utils' imported from .\node_modules\.pnpm\@[email protected]_@[email protected][email protected]_prettier@3._cf7nqnu6p5s3tdreqzupsb4qie\node_modules\@storybook\addon-svelte-csf\dist\compiler\pre-transform\codemods\legacy-story.js
    at finalizeResolution (node:internal/modules/esm/resolve:275:11)
    at moduleResolve (node:internal/modules/esm/resolve:860:10)
    at defaultResolve (node:internal/modules/esm/resolve:984:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:688:12)
    at #cachedDefaultResolve (node:internal/modules/esm/loader:612:25)
    at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:647:38)
    at ModuleLoader.resolveSync (node:internal/modules/esm/loader:670:52)
    at #cachedResolveSync (node:internal/modules/esm/loader:631:25)
    at ModuleLoader.getModuleJobForRequire (node:internal/modules/esm/loader:359:50)
    at new ModuleJobSync (node:internal/modules/esm/module_job:342:34)
Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file c:\ws\deps\uv\src\win\async.c, line 76
 ELIFECYCLE  Command failed with exit code 3221226505.
@good-dev-student
Copy link
Author

package.json

@manuel3108 manuel3108 added bug Something isn't working upstream labels Dec 29, 2024
@manuel3108
Copy link
Member

Duplicate of #320

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

2 participants