microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.27k stars 28.57k forks source link

cannot install redux toolkit #211517

Closed Ankush-ts closed 4 months ago

Ankush-ts commented 4 months ago

Type: Bug

npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: 12usertable@0.0.0 npm ERR! Found: react@18.3.1 npm ERR! node_modules/react npm ERR! peer react@"^18.3.1" from react-dom@18.3.1 npm ERR! node_modules/react-dom npm ERR! react-dom@"^18.2.0" from the root project npm ERR! react@"^18.2.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! @reduxjs/toolkit@"" from the root project npm ERR! npm ERR! Conflicting peer dependency: react@18.2.0 npm ERR! node_modules/react npm ERR! peer react@"18.2.0" from react-native@0.74.0 npm ERR! node_modules/react-native npm ERR! peerOptional react-native@">=0.69" from react-redux@9.1.1 npm ERR! node_modules/react-redux npm ERR! peerOptional react-redux@"^7.2.1 || ^8.1.3 || ^9.0.0" from @reduxjs/toolkit@2.2.3 npm ERR! node_modules/@reduxjs/toolkit npm ERR! @reduxjs/toolkit@"" 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. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! C:\Users\ankup\AppData\Local\npm-cache_logs\2024-04-27T06_37_45_549Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: C:\Users\ankup\AppData\Local\npm-cache_logs\2024-04-27T06_37_45_549Z-debug-0.log

VS Code version: Code 1.88.1 (e170252f762678dec6ca2cc69aba1570769a5d39, 2024-04-10T17:41:02.734Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|12th Gen Intel(R) Core(TM) i5-12500H (16 x 3110)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.71GB (6.41GB free)| |Process Argv|--crash-reporter-id a5400a7f-6fe0-4301-ae44-8993d583018e| |Screen Reader|no| |VM|0%|
Extensions (16) Extension|Author (truncated)|Version ---|---|--- nodejs-bundle|1Yi|1.0.0 svelte-bundle|1Yi|1.0.0 svelte-intellisense|ard|0.7.1 vscode-tailwindcss|bra|0.10.5 prettier-vscode|esb|10.4.0 vscode-svelte-snippets|fiv|0.5.0 auto-rename-tag|for|0.1.10 code-runner|for|0.12.2 svg|joc|1.5.3 vscode-thunder-client|ran|2.21.16 LiveServer|rit|5.7.9 vs-code-prettier-eslint|rve|6.0.0 vscode-standard|sta|2.1.3 svelte-vscode|sve|108.4.0 ReactSnippets|xab|2.4.0 vscode-surround|yat|1.5.0
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscorecescf:30445987 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 vscrp:30673768 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 fegfb526:30981948 bg6jg535:30979843 ccp2r3:30993541 dsvsc020:30976470 pythonait:31006305 gee8j676:31009558 chatpanelt:31018789 dsvsc021:30996838 9c06g630:31013171 pythoncenvpt:31022790 ```
theCuriousOne commented 4 months ago

I doubt this has anything to do with visual studio code. Anyhow, can you answer the following:

What command are you using? What is the content of your packages.json file? Would be nice to see the "C:\Users\ankup\AppData\Local\npm-cache_logs\2024-04-27T06_37_45_549Z-eresolve-report.txt" and "C:\Users\ankup\AppData\Local\npm-cache_logs\2024-04-27T06_37_45_549Z-debug-0.log" files

IllusionMH commented 4 months ago

/question

You try to install packages that have conflicting version of their peer dependencies. It has nothing to do with VS Code editor itself.

VSCodeTriageBot commented 4 months ago

We closed this issue because it is a question about using VS Code rather than an issue or feature request. Please search for help on StackOverflow, where the community has already answered thousands of similar questions. You may find their guide on asking a new question helpful if your question has not already been asked. See also our issue reporting guidelines.

Happy Coding!