-
Notifications
You must be signed in to change notification settings - Fork 472
Does AsyncStorage support react 17.0.1 or how do i do that? #535
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
Comments
It looks like you're trying to use react 17.0.1 with react-native 0.63 when you should be using 16.13.1. I don't think that's such a good idea as we've seen breakages when they are out of sync. My suggestion is that you downgrade react to 16.13.1. If you really need react 17, you can try using one of the flags mentioned in the error message:
That said, we've added 17 to our peer dependency to ensure that you'll be able to use AsyncStorage with react-native 0.64 as well. |
🎉 This issue has been resolved in version 1.13.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hi @krizzu , Did you change something? I got the same error @Redstonerayy reported when I ran Am I doing something wrong? Is version 2.0.0-rc.3 stable enough to use in production? Would I be better off going back to an earlier version, such as 1.12.1, and ignoring the message about not being compatible with react 17.01 (which is compatible with all the other modules I'm using)? Thank you in advance for your help with this! Best, |
@stevehs17: This package was renamed to |
You want to:
Does AsyncStorage support react 17.0.1 or how do i do that?
Details:
The installation guide says you can install it with
npm install @react-native-async-storage/async-storage
but this is not working for me.
I get this Error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8" from @react-native-async-storage/[email protected]
npm ERR! node_modules/@react-native-async-storage/async-storage
npm ERR! @react-native-async-storage/async-storage@"*" 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! See C:\Users\Anton\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Anton\AppData\Local\npm-cache_logs\2021-01-28T19_05_32_759Z-debug.log
And in the debug.log is this:
verbose cli [
0 verbose cli 'C:\Program Files\nodejs\node.exe',
0 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
0 verbose cli 'install',
0 verbose cli '@react-native-async-storage/async-storage'
0 verbose cli ]
1 info using [email protected]
2 info using [email protected]
3 timing config:load:defaults Completed in 2ms
4 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 2ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:C:\Users\Anton\Desktop\Desktop\Javascript\React\calendar.npmrc Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:C:\Users\Anton.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:C:\Users\Anton\AppData\Roaming\npm\etc\npmrc Completed in 0ms
13 timing config:load:global Completed in 1ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 9ms
19 verbose npm-session 6e32c1d69468b62c
20 timing npm:load Completed in 18ms
21 timing arborist:ctor Completed in 1ms
22 timing idealTree:init Completed in 800ms
23 timing idealTree:userRequests Completed in 2ms
24 silly idealTree buildDeps
25 silly fetch manifest @react-native-async-storage/async-storage@*
26 timing arborist:ctor Completed in 0ms
27 http fetch GET 304 https://registry.npmjs.org/@react-native-async-storage%2fasync-storage 872ms (from cache)
28 silly fetch manifest react@^17.0.1
29 http fetch GET 304 https://registry.npmjs.org/react 68ms (from cache)
30 timing idealTree Completed in 1754ms
31 timing command:install Completed in 1757ms
32 verbose stack Error: unable to resolve dependency tree
32 verbose stack at Arborist.[failPeerConflict] (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:1061:25)
32 verbose stack at Arborist.[loadPeerSet] (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:1041:36)
32 verbose stack at async Arborist.[buildDepStep] (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:796:11)
32 verbose stack at async Arborist.buildIdealTree (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:209:7)
32 verbose stack at async Promise.all (index 1)
32 verbose stack at async Arborist.reify (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\reify.js:123:5)
32 verbose stack at async install (C:\Program Files\nodejs\node_modules\npm\lib\install.js:38:3)
33 verbose cwd C:\Users\Anton\Desktop\Desktop\Javascript\React\calendar
34 verbose Windows_NT 10.0.18363
35 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "@react-native-async-storage/async-storage"
36 verbose node v15.5.0
37 verbose npm v7.3.0
38 error code ERESOLVE
39 error ERESOLVE unable to resolve dependency tree
40 error
41 error While resolving: �[1mcalendar�[22m@�[1m0.1.0�[22m
41 error Found: �[1mreact�[22m@�[1m17.0.1�[22m�[2m�[22m
41 error �[2mnode_modules/react�[22m
41 error �[1mreact�[22m@"�[1m^17.0.1�[22m" from the root project
41 error
41 error Could not resolve dependency:
41 error �[35mpeer�[39m �[1mreact�[22m@"�[1m^16.8�[22m" from �[1m@react-native-async-storage/async-storage�[22m@�[1m1.13.3�[22m�[2m�[22m
41 error �[2mnode_modules/@react-native-async-storage/async-storage�[22m
41 error �[1m@react-native-async-storage/async-storage�[22m@"�[1m*�[22m" from the root project
41 error
41 error Fix the upstream dependency conflict, or retry
41 error this command with --force, or --legacy-peer-deps
41 error to accept an incorrect (and potentially broken) dependency resolution.
41 error
41 error See C:\Users\Anton\AppData\Local\npm-cache\eresolve-report.txt for a full report.
42 verbose exit 1
It seems to me, that the @react-native-async-storage/async-storage package need react 16.8 to function.
When will this functionality come or am I doing something wrong.
When i try to change the react and react-dom version in package.json to ^16.8 i can run npm install and it works fine,
but when i try npm install @react-native-async-storage/async-storage i get another error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^16.8" from the root project
npm ERR! peer react@"^16.8" from @react-native-async-storage/[email protected]
npm ERR! node_modules/@react-native-async-storage/async-storage
npm ERR! @react-native-async-storage/async-storage@"" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"16.13.1" from [email protected]
npm ERR! node_modules/react-native
npm ERR! peer react-native@">=0.59" from @react-native-async-storage/[email protected]
npm ERR! node_modules/@react-native-async-storage/async-storage
npm ERR! @react-native-async-storage/async-storage@"" 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! See C:\Users\Anton\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Anton\AppData\Local\npm-cache_logs\2021-01-28T19_14_12_046Z-debug.log
Debug Log:
0 verbose cli [
0 verbose cli 'C:\Program Files\nodejs\node.exe',
0 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
0 verbose cli 'install',
0 verbose cli '@react-native-async-storage/async-storage'
0 verbose cli ]
1 info using [email protected]
2 info using [email protected]
3 timing config:load:defaults Completed in 2ms
4 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 2ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:C:\Users\Anton\Desktop\Desktop\Javascript\React\calendar.npmrc Completed in 1ms
9 timing config:load:project Completed in 2ms
10 timing config:load:file:C:\Users\Anton.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:C:\Users\Anton\AppData\Roaming\npm\etc\npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 9ms
19 verbose npm-session b20f81b65c9dfade
20 timing npm:load Completed in 17ms
21 timing arborist:ctor Completed in 0ms
22 timing idealTree:init Completed in 775ms
23 timing idealTree:userRequests Completed in 2ms
24 silly idealTree buildDeps
25 silly fetch manifest @react-native-async-storage/async-storage@*
26 timing arborist:ctor Completed in 0ms
27 http fetch GET 304 https://registry.npmjs.org/@react-native-async-storage%2fasync-storage 909ms (from cache)
28 silly fetch manifest react@^16.8
29 http fetch GET 304 https://registry.npmjs.org/react 85ms (from cache)
30 silly fetch manifest react-native@>=0.59
31 http fetch GET 304 https://registry.npmjs.org/react-native 68ms (from cache)
32 timing idealTree Completed in 1870ms
33 timing command:install Completed in 1874ms
34 verbose stack Error: unable to resolve dependency tree
34 verbose stack at Arborist.[failPeerConflict] (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:1061:25)
34 verbose stack at Arborist.[loadPeerSet] (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:1054:30)
34 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:860:34
34 verbose stack at async Arborist.[loadPeerSet] (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:1023:11)
34 verbose stack at async Arborist.[buildDepStep] (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:796:11)
34 verbose stack at async Arborist.buildIdealTree (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:209:7)
34 verbose stack at async Promise.all (index 1)
34 verbose stack at async Arborist.reify (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\reify.js:123:5)
34 verbose stack at async install (C:\Program Files\nodejs\node_modules\npm\lib\install.js:38:3)
35 verbose cwd C:\Users\Anton\Desktop\Desktop\Javascript\React\calendar
36 verbose Windows_NT 10.0.18363
37 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "@react-native-async-storage/async-storage"
38 verbose node v15.5.0
39 verbose npm v7.3.0
40 error code ERESOLVE
41 error ERESOLVE unable to resolve dependency tree
42 error
43 error While resolving: �[1mcalendar�[22m@�[1m0.1.0�[22m
43 error Found: �[1mreact�[22m@�[1m16.14.0�[22m�[2m�[22m
43 error �[2mnode_modules/react�[22m
43 error �[1mreact�[22m@"�[1m^16.8�[22m" from the root project
43 error �[35mpeer�[39m �[1mreact�[22m@"�[1m^16.8�[22m" from �[1m@react-native-async-storage/async-storage�[22m@�[1m1.13.3�[22m�[2m�[22m
43 error �[2mnode_modules/@react-native-async-storage/async-storage�[22m
43 error �[1m@react-native-async-storage/async-storage�[22m@"�[1m�[22m" from the root project
43 error
43 error Could not resolve dependency:
43 error �[35mpeer�[39m �[1mreact�[22m@"�[1m16.13.1�[22m" from �[1mreact-native�[22m@�[1m0.63.4�[22m�[2m�[22m
43 error �[2mnode_modules/react-native�[22m
43 error �[35mpeer�[39m �[1mreact-native�[22m@"�[1m>=0.59�[22m" from �[1m@react-native-async-storage/async-storage�[22m@�[1m1.13.3�[22m�[2m�[22m
43 error �[2mnode_modules/@react-native-async-storage/async-storage�[22m
43 error �[1m@react-native-async-storage/async-storage�[22m@"�[1m�[22m" from the root project
43 error
43 error Fix the upstream dependency conflict, or retry
43 error this command with --force, or --legacy-peer-deps
43 error to accept an incorrect (and potentially broken) dependency resolution.
43 error
43 error See C:\Users\Anton\AppData\Local\npm-cache\eresolve-report.txt for a full report.
44 verbose exit 1
This lets me think that i would have to start a new [email protected] project or wait until support for 17.x comes.
When will it be?
Sorry for much lines or errors. Wanted it to be complete.
The text was updated successfully, but these errors were encountered: