@justifycontent

Почему не могу установить redux-thunk?

При попытке установить redux-thunk командой "npm install redux-thunk", консоль выдает ошибку:
65b0e6a52b133959288028.png

Лог файл:
0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\sakhalinex\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
1 info using npm@8.18.0
2 info using node@v20.11.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 0ms
5 timing config:load:file:C:\Users\sakhalinex\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 3ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:C:\Users\sakhalinex\Desktop\projects\react-pizza\.npmrc Completed in 0ms
10 timing config:load:project Completed in 3ms
11 timing config:load:file:C:\Users\sakhalinex\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\sakhalinex\AppData\Roaming\npm\etc\npmrc Completed in 1ms
14 timing config:load:global Completed in 1ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 9ms
19 timing npm:load:configload Completed in 9ms
20 timing npm:load:mkdirpcache Completed in 0ms
21 timing npm:load:mkdirplogs Completed in 0ms
22 verbose title npm i redux-thunk
23 verbose argv "i" "redux-thunk"
24 timing npm:load:setTitle Completed in 0ms
25 timing config:load:flatten Completed in 2ms
26 timing npm:load:display Completed in 2ms
27 verbose logfile logs-max:10 dir:C:\Users\sakhalinex\AppData\Local\npm-cache\_logs
28 verbose logfile C:\Users\sakhalinex\AppData\Local\npm-cache\_logs\2024-01-24T10_22_18_694Z-debug-0.log
29 timing npm:load:logFile Completed in 15ms
30 timing npm:load:timers Completed in 0ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 28ms
33 timing arborist:ctor Completed in 0ms
34 silly logfile start cleaning logs, removing 2 files
35 silly logfile done cleaning log files
36 timing idealTree:init Completed in 461ms
37 timing idealTree:userRequests Completed in 2ms
38 silly idealTree buildDeps
39 silly fetch manifest redux-thunk@*
40 timing arborist:ctor Completed in 0ms
41 http fetch GET 200 https://registry.npmjs.org/redux-thunk 398ms (cache hit)
42 silly fetch manifest redux@^4.2.1
43 http fetch GET 200 https://registry.npmjs.org/redux 6ms (cache hit)
44 silly fetch manifest redux@^5.0.0
45 timing idealTree Completed in 876ms
46 timing command:i Completed in 885ms
47 verbose stack Error: unable to resolve dependency tree
47 verbose stack at [failPeerConflict] (C:\Users\sakhalinex\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1427:25)
47 verbose stack at [loadPeerSet] (C:\Users\sakhalinex\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1393:34)
47 verbose stack at async [buildDepStep] (C:\Users\sakhalinex\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:976:11)
47 verbose stack at async Arborist.buildIdealTree (C:\Users\sakhalinex\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:218:7)
47 verbose stack at async Promise.all (index 1)
47 verbose stack at async Arborist.reify (C:\Users\sakhalinex\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:154:5)
47 verbose stack at async Install.exec (C:\Users\sakhalinex\AppData\Roaming\npm\node_modules\npm\lib\commands\install.js:145:5)
47 verbose stack at async module.exports (C:\Users\sakhalinex\AppData\Roaming\npm\node_modules\npm\lib\cli.js:78:5)
48 verbose cwd C:\Users\sakhalinex\Desktop\projects\react-pizza
49 verbose Windows_NT 10.0.19042
50 verbose node v20.11.0
51 verbose npm v8.18.0
52 error code ERESOLVE
53 error ERESOLVE unable to resolve dependency tree
54 error
55 error While resolving: [1mreact-pizza[22m@[1m0.1.0[22m
55 error Found: [1mredux[22m@[1m4.2.1[22m[2m[22m
55 error [2mnode_modules/redux[22m
55 error [1mredux[22m@"[1m^4.2.1[22m" from the root project
55 error
55 error Could not resolve dependency:
55 error [35mpeer[39m [1mredux[22m@"[1m^5.0.0[22m" from [1mredux-thunk[22m@[1m3.1.0[22m[2m[22m
55 error [2mnode_modules/redux-thunk[22m
55 error [1mredux-thunk[22m@"[1m*[22m" from the root project
55 error
55 error Fix the upstream dependency conflict, or retry
55 error this command with --force, or --legacy-peer-deps
55 error to accept an incorrect (and potentially broken) dependency resolution.
55 error
55 error See C:\Users\sakhalinex\AppData\Local\npm-cache\eresolve-report.txt for a full report.
56 verbose exit 1
57 timing npm Completed in 978ms
58 verbose unfinished npm timer reify 1706091738783
59 verbose unfinished npm timer reify:loadTrees 1706091738790
60 verbose unfinished npm timer idealTree:buildDeps 1706091739253
61 verbose unfinished npm timer idealTree:#root 1706091739254
62 verbose code 1
63 error A complete log of this run can be found in:
63 error C:\Users\sakhalinex\AppData\Local\npm-cache\_logs\2024-01-24T10_22_18_694Z-debug-0.log

Как я понимаю, ошибка зависимостей, но как понять что конкретно не так
  • Вопрос задан
  • 79 просмотров
Решения вопроса 1
Mike_Ro
@Mike_Ro
Python, JS, WordPress, SEO, Bots, Adversting
А самому прочитать ошибку?
41 http fetch GET 200 https://registry.npmjs.org/redux-thunk 398ms (cache hit)
42 silly fetch manifest redux@^4.2.1
43 http fetch GET 200 https://registry.npmjs.org/redux 6ms (cache hit)
44 silly fetch manifest redux@^5.0.0

redux-thunk требует, чтобы в проекте был redux: ^5.0.0, а у Вас ^4.2.1, либо ставить указанный npm install redux@^5.0.0, либо использовать в режиме совместимости (возможна, нестабильная работа):npm install redux-thunk --legacy-peer-deps

Бодрящий шрифт консоли, зачет!
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы