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

Conflicting Peer Dependencies #271

Closed
youngbloodcyb opened this issue Jul 3, 2023 · 4 comments
Closed

Conflicting Peer Dependencies #271

youngbloodcyb opened this issue Jul 3, 2023 · 4 comments

Comments

@youngbloodcyb
Copy link

Error when running npm i with the AI SDK installed (version 2.1.14). Conflicting peer dependency versions between sswr package and ai. ai says Svelte must be version 4 or higher, whereas sswr is saying version 3.59.2 or higher.

I'm getting this error using Next 13.4.7. Ironically I'm not using Svelte at all, but it is causing a dependency issue. Curious to see if anyone else is getting this same issue. Could be something I'm doing or something I can resolve.

I included I full log file below.

/Users/user/.npm/_logs/2023-07-03T16_14_25_130Z-debug-0.log

# npm resolution error report

While resolving: ai@2.1.14
Found: svelte@3.59.2
node_modules/svelte
  peer svelte@"^3.29.0" from sswr@1.10.0
  node_modules/sswr
    sswr@"^1.10.0" from ai@2.1.14
    node_modules/ai
      ai@"^2.1.14" from the root project

Could not resolve dependency:
peerOptional svelte@"^4.0.0" from ai@2.1.14
node_modules/ai
  ai@"^2.1.14" from the root project

Conflicting peer dependency: svelte@4.0.2
node_modules/svelte
  peerOptional svelte@"^4.0.0" from ai@2.1.14
  node_modules/ai
    ai@"^2.1.14" from the root project

Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.```
@MaxLeiter
Copy link
Member

MaxLeiter commented Jul 3, 2023

This is an issue with the upstream SSWR library and our use of dependencies versus optional deps. I'll take a look, thanks!

@MaxLeiter
Copy link
Member

Closing as a duplicate of #248

@youngbloodcyb
Copy link
Author

Thanks! And sorry, didn't see there was already an issue open 🤦

@carlos-felipe-dev
Copy link

What I did to make this work on npm is Ctrl + Shift + F and find all svelte dependencies in my project and remove them from the package json files (I'm using React so no need for those). I have a working chatbot in my repository that is as bare bones as I could make it. Interestingly enough having some Vue dependencies gives no errors.
nosvelte

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

3 participants