fix: update @types/node to resolve Vite 7.x peer dependency conflict#82794
Merged
icyJoseph merged 6 commits intovercel:canaryfrom Aug 20, 2025
Merged
fix: update @types/node to resolve Vite 7.x peer dependency conflict#82794icyJoseph merged 6 commits intovercel:canaryfrom
icyJoseph merged 6 commits intovercel:canaryfrom
Conversation
Member
|
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
icyJoseph
reviewed
Aug 19, 2025
Co-authored-by: Joseph <[email protected]>
icyJoseph
approved these changes
Aug 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The project was experiencing npm dependency resolution conflicts when running
npm install, caused by incompatible @types/node versions between Vite 7.1.3 and the existing project dependencies.Fixes: #82779
Error Details:
@types/node@"^20.19.0 || >=22.12.0"@types/[email protected]Solution
Updated
@types/nodefrom20.10.4to a compatible version that satisfies Vite 7.x requirements while maintaining compatibility with Vitest 3.2.4.Changes Made
@types/nodeversion in package.jsonTesting
npm installruns without errorsnpm testpasses all existing testsAdditional Notes
This fix resolves the immediate dependency conflict. The React.act deprecation warnings in tests are a separate issue and should be addressed in a future PR by updating test imports from
react-dom/test-utilstoreact.Details Issue:
1]
npm test
The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
DEV v1.0.4 /home/hareesh/learn-frontend/front-open-source/next.js/examples/with-vitest
stderr | app/blog/[slug]/page.test.tsx > App Router: Works with dynamic route segments
Warning:
ReactDOMTestUtils.actis deprecated in favor ofReact.act. Importactfromreactinstead ofreact-dom/test-utils. See https://react.dev/warnings/react-dom-test-utils for more info.stderr | app/page.test.tsx > App Router: Works with Server Components
Warning:
ReactDOMTestUtils.actis deprecated in favor ofReact.act. Importactfromreactinstead ofreact-dom/test-utils. See https://react.dev/warnings/react-dom-test-utils for more info.stderr | app/counter.test.tsx > App Router: Works with Client Components
Warning:
ReactDOMTestUtils.actis deprecated in favor ofReact.act. Importactfromreactinstead ofreact-dom/test-utils. See https://react.dev/warnings/react-dom-test-utils for more info.stderr | tests/Home.test.tsx > Pages Router
Warning:
ReactDOMTestUtils.actis deprecated in favor ofReact.act. Importactfromreactinstead ofreact-dom/test-utils. See https://react.dev/warnings/react-dom-test-utils for more info.2]
npm install
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: @types/[email protected]
npm error node_modules/@types/node
npm error dev @types/node@"20.10.4" from the root project
npm error peerOptional @types/node@"^18.0.0 || ^20.0.0 || >=22.0.0" from [email protected]
npm error node_modules/vitest
npm error dev vitest@"^3.2.4" from the root project
npm error
npm error Could not resolve dependency:
npm error peerOptional @types/node@"^20.19.0 || >=22.12.0" from [email protected]
npm error node_modules/vite
npm error peer vite@"^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" from @vitejs/[email protected]
npm error node_modules/@vitejs/plugin-react
npm error dev @vitejs/plugin-react@"^4.2.1" from the root project
npm error vite@"^5.0.0 || ^6.0.0 || ^7.0.0-0" from [email protected]
npm error node_modules/vitest
npm error dev vitest@"^3.2.4" from the root project
npm error
npm error Conflicting peer dependency: @types/[email protected]
npm error node_modules/@types/node
npm error peerOptional @types/node@"^20.19.0 || >=22.12.0" from [email protected]
npm error node_modules/vite
npm error peer vite@"^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" from @vitejs/[email protected]
npm error node_modules/@vitejs/plugin-react
npm error dev @vitejs/plugin-react@"^4.2.1" from the root project
npm error vite@"^5.0.0 || ^6.0.0 || ^7.0.0-0" from [email protected]
npm error node_modules/vitest
npm error dev vitest@"^3.2.4" 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/hareesh/.npm/_logs/2025-08-19T17_17_17_782Z-eresolve-report.txt
npm error A complete log of this run can be found in: /home/hareesh/.npm/_logs/2025-08-19T17_17_17_782Z-debug-0.log