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

@histoire/plugin-svelte: Peer Dependency "svelte": "^3.0.0" prevents installation of svelte 4 #551

Closed
6 tasks done
hexagon6 opened this issue Jun 23, 2023 · 2 comments · Fixed by #569
Closed
6 tasks done
Labels
to triage This issue needs to be triaged

Comments

@hexagon6
Copy link
Contributor

Describe the bug

When migrating from svelte 3 to svelte 4 in a sveltekit project which uses histoire, I get the following error on npm install.

$ npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @histoire/plugin-svelte@0.16.1
npm ERR! Found: svelte@4.0.0
npm ERR! node_modules/svelte
npm ERR!   dev svelte@"^4.0.0" from the root project
npm ERR!   peer svelte@"^3.54.0 || ^4.0.0-next.0" from @sveltejs/kit@1.20.4
npm ERR!   node_modules/@sveltejs/kit
npm ERR!     dev @sveltejs/kit@"^1.20.4" from the root project
npm ERR!     peer @sveltejs/kit@"^1.0.0" from @sveltejs/adapter-auto@2.1.0
npm ERR!     node_modules/@sveltejs/adapter-auto
npm ERR!       dev @sveltejs/adapter-auto@"^2.0.0" from the root project
npm ERR!     1 more (@sveltejs/adapter-static)
npm ERR!   6 more (@sveltejs/vite-plugin-svelte, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer svelte@"^3.0.0" from @histoire/plugin-svelte@0.16.1
npm ERR! node_modules/@histoire/plugin-svelte
npm ERR!   dev @histoire/plugin-svelte@"^0.16.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: svelte@3.59.2
npm ERR! node_modules/svelte
npm ERR!   peer svelte@"^3.0.0" from @histoire/plugin-svelte@0.16.1
npm ERR!   node_modules/@histoire/plugin-svelte
npm ERR!     dev @histoire/plugin-svelte@"^0.16.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

So my conclusion is: @histoire/plugin-svelte: Peer Dependency "svelte": "^3.0.0" prevents installation of svelte 4

Reproduction

Install sveltekit in version ^1.13.0 with svelte@3 with @histoire/plugin-svelte and then run npx svelte-migrate svelte-4 to migrate to svelte@4 and sveltekit to ^1.20.4.

This will lead to conflicting peer dependencies because of peer dependency definition of @histoire/plugin-svelte@0.16.1 .

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 7 PRO 5850U with Radeon Graphics
    Memory: 27.08 GB / 30.18 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.16.1 - ~/.nvm/versions/node/v18.16.1/bin/node
    npm: 9.7.2 - ~/.nvm/versions/node/v18.16.1/bin/npm
  Browsers:
    Brave Browser: 114.1.52.126
  npmPackages:
    @histoire/plugin-svelte: ^0.16.1 => 0.16.1 
    histoire: ^0.16.1 => 0.16.2 
    vite: ^4.2.1 => 4.3.9

Used Package Manager

npm

Validations

@hexagon6 hexagon6 added the to triage This issue needs to be triaged label Jun 23, 2023
@brittneypostma
Copy link

Is there a timeline on supporting Svelte 4? I am looking into using Histoire over Storybook in a project that is starting soon, but this would be a blocker.

@swyxio
Copy link

swyxio commented Aug 13, 2023

@brittneypostma i believe it is supported, the version number bump is just overly restrictive. just force install

Akryum pushed a commit that referenced this issue Aug 13, 2023
…plugin (fix #551) (#569)

Co-authored-by: bledeabogdan <114652903+bledeabogdan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to triage This issue needs to be triaged
Projects
None yet
3 participants