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

ERESOLVE could not resolve on npm install @uppy/svelte": "2.0.0" and @uppy/xhr-upload": "3.0.0" #4057

Closed
2 tasks done
frederikhors opened this issue Aug 29, 2022 · 5 comments
Assignees
Labels

Comments

@frederikhors
Copy link
Contributor

frederikhors commented Aug 29, 2022

Initial checklist

  • I understand this is a bug report and questions should be posted in the Community Forum
  • I searched issues and couldn’t find anything (or linked relevant results below)

Steps to reproduce

I have these in package.json:

"@uppy/svelte": "1.0.8",
"@uppy/xhr-upload": "2.1.2",

I'm trying to install:

"@uppy/svelte": "2.0.0",
"@uppy/xhr-upload": "3.0.0",

Expected behavior

It should install.

Actual behavior

But I'm getting this error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: project@0.2.0
npm ERR! Found: @uppy/svelte@1.0.8
npm ERR! node_modules/@uppy/svelte
npm ERR!   dev @uppy/svelte@"2.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev @uppy/svelte@"2.0.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @uppy/core@3.0.0
npm ERR! node_modules/@uppy/core
npm ERR!   peer @uppy/core@"^3.0.0" from @uppy/svelte@2.0.0
npm ERR!   node_modules/@uppy/svelte
npm ERR!     dev @uppy/svelte@"2.0.0" 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.

What's the problem?

@frederikhors frederikhors changed the title ERESOLVE could not resolve on npm install @uppy/svelte": "2.0.0 and @uppy/xhr-upload": "3.0.0 ERESOLVE could not resolve on npm install @uppy/svelte": "2.0.0" and @uppy/xhr-upload": "3.0.0" Aug 29, 2022
@aduh95
Copy link
Member

aduh95 commented Aug 30, 2022

Hi, you want to have @uppy/core in your deps, otherwise you'll get conflicts if the version locally installed does not correspond to the one expected. Let me know if that helps.

@Murderlon Murderlon linked a pull request Aug 30, 2022 that will close this issue
@frederikhors
Copy link
Contributor Author

It does not help.

In a new node project I'm trying to install those two dependencies. And boom! the error!

I think something is broken with deps.

@aduh95
Copy link
Member

aduh95 commented Aug 30, 2022

In a new node project I'm trying to install those two dependencies. And boom! the error!

I think something is broken with deps.

I've tried it in a new project:

mkdir repro && cd repro
echo '{"dependencies": {"@uppy/svelte": "2.0.0","@uppy/xhr-upload": "3.0.0"}}' > package.json
npm i

I don't see any error, npm installs everything without problem.

I can reproduce if I first install the previous version though:

mkdir repro && cd repro
echo '{"dependencies": {"@uppy/svelte": "1.0.8","@uppy/xhr-upload": "2.1.2"}}' > package.json
npm i
echo '{"dependencies": {"@uppy/svelte": "2.0.0","@uppy/xhr-upload": "3.0.0"}}' > package.json
npm i # this errors

However adding @uppy/core to the list of dependencies does fix the error:

mkdir repro && cd repro
echo '{"dependencies": {"@uppy/svelte": "1.0.8","@uppy/xhr-upload": "2.1.2"}}' > package.json
npm i
echo '{"dependencies": {"@uppy/core":"3.0.0","@uppy/svelte": "2.0.0","@uppy/xhr-upload": "3.0.0"}}' > package.json
npm i # no errors

It looks like it's an npm issue, I can't reproduce with Yarn nor pnpm.

@frederikhors
Copy link
Contributor Author

It works now. I removed the old, npm install and installed the new ones.

The update was the issue here. IDN why.

Thanks for the help.

@aduh95
Copy link
Member

aduh95 commented Aug 30, 2022

OK good to hear 👍 Thanks for the report, I'll add a note in the migration guide about this.

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

No branches or pull requests

2 participants