Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

Consider bumping version of @preact/compat to 18 #4441

Closed
zetaraku opened this issue Jul 12, 2024 · 0 comments · Fixed by preactjs/compat-alias-package#13
Closed

Consider bumping version of @preact/compat to 18 #4441

zetaraku opened this issue Jul 12, 2024 · 0 comments · Fixed by preactjs/compat-alias-package#13

Comments

@zetaraku
Copy link

zetaraku commented Jul 12, 2024

Describe the feature you'd love to see

I'm using @tanstack/react-query and resolved the preactjs/preset-vite#124 problem by manually aliasing react through:

$ npm install react@npm:@preact/compat react-dom@npm:@preact/compat

However, @tanstack/react-query requires peer dependency of react@^18.0.0, but the current version of @preact/compat is still in 17.1.2.

The installation succeeds with some peer dependency overriding warnings, but when running npm ci, the following error occurred:

Run npm ci
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @tanstack/react-query@5.51.1
npm error Found: react@17.1.2
npm error node_modules/react
npm error   react@"npm:@preact/compat@^17.1.2" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"^18.0.0" from @tanstack/react-query@5.51.1
npm error node_modules/@tanstack/react-query
npm error   @tanstack/react-query@"^5.51.1" from the root project
npm error
npm error Conflicting peer dependency: react@18.3.1
npm error node_modules/react
npm error   peer react@"^18.0.0" from @tanstack/react-query@5.51.1
npm error   node_modules/@tanstack/react-query
npm error     @tanstack/react-query@"^5.51.1" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /home/runner/.npm/_logs/2024-07-12T05_26_44_601Z-eresolve-report.txt

I wonder if it's suitable to bump the version of @preact/compat to at least 18.

Additional context (optional)

Reproduction repo:

https://github.com/zetaraku/hello-preact

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

Successfully merging a pull request may close this issue.

2 participants