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

SvelteKit build fails due to peer dependency issues with Svelte v4 #90

Open
StephenGunn opened this issue Jun 27, 2023 · 8 comments
Open

Comments

@StephenGunn
Copy link

StephenGunn commented Jun 27, 2023

With the new Svelte 4 release, trying to build my SvelteKit project fails due to the peer svelte@"^3.0.0" dependency in Svelte-mapbox.

Just messing with it in dev, I don't have any issues using Svelte 4 with the current version of Svelte-mapbox.

I don't know what testing you would want to do before bumping that number up to include Svelte 4, or I would just submit a pull request to fix it.

Thank you for the great package, I use it in multiple sites with great success.

The full error on Cloudflare Pages:

12:30:43.619 | npm ERR! Found: [email protected]
12:30:43.619 | npm ERR! node_modules/svelte
12:30:43.619 | npm ERR!   dev svelte@"^4.0.0" from the root project
12:30:43.619 | npm ERR!
12:30:43.619 | npm ERR! Could not resolve dependency:
12:30:43.620 | npm ERR! peer svelte@"^3.0.0" from @beyonk/[email protected]
12:30:43.620 | npm ERR! node_modules/@beyonk/svelte-mapbox
12:30:43.620 | npm ERR!   dev @beyonk/svelte-mapbox@"^9.1.0" from the root project
12:30:43.620 | npm ERR!
12:30:43.620 | npm ERR! Fix the upstream dependency conflict, or retry
12:30:43.620 | npm ERR! this command with --force, or --legacy-peer-deps

adding --force to the build command does not fix the problem.

@nk9
Copy link

nk9 commented Jul 16, 2023

Just tried installing svelte-mapbox and ran into the same error. Think this will be affecting most potential new users at this point.

@StephenGunn
Copy link
Author

I opened a pull request to add svelte 4 compatibility.

I know Antony is a busy guy so I published a temp package that fixes the compatibility: https://www.npmjs.com/package/svelte-mapbox-4-temp

I will delete my temp package once compatibility on this repo gets added.

@brendanmatkin
Copy link

I'm using pnpm - it gives a warning but still works fine.

Not a real solution but an alternate work around if you need to make it work!

@nk9
Copy link

nk9 commented Dec 16, 2023

Tagging @antony for visibility. This project is broken on the current release of Svelte.

@codeforfunzz
Copy link

codeforfunzz commented Feb 9, 2024

in your project, edit package.json like this:

"devDependencies": {
...
"@beyonk/svelte-mapbox": "^9.1.0",
...
},
 "overrides": {
    "@beyonk/svelte-mapbox": {
      "svelte": "$svelte"
    }
  }

@nk9
Copy link

nk9 commented Jun 18, 2024

Peer deps have been updated with this commit: 1e2edf8

Is this bug fixed?

@antony
Copy link
Member

antony commented Nov 11, 2024

Will be fixed in the next release.

@nk9
Copy link

nk9 commented Dec 26, 2024

Thanks @antony. Looks like a release has gone out. Can this be closed now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants