I could not install expo date picker.

Please provide the following:

  1. SDK Version:~41.0.1
  2. Platforms(Android/iOS/web/all): android
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

Replace this section with as much relevant information as possible and any relevant code along with your question.
I am trying to install date picker for my project, but I could not do it. I am getting an error as below: The whole error log is here

0 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install' ]
1 info using npm@7.15.1
2 info using node@v16.3.0
3 timing npm:load:whichnode Completed in 2ms
4 timing config:load:defaults Completed in 9ms
5 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 5ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:/media/chaitu/prash/project001-main/.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:/home/chaitu/.npmrc Completed in 0ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:/usr/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:credentials Completed in 3ms
17 timing config:load:setEnvs Completed in 2ms
18 timing config:load Completed in 24ms
19 timing npm:load:configload Completed in 24ms
20 timing npm:load:setTitle Completed in 1ms
21 timing npm:load:setupLog Completed in 1ms
22 timing npm:load:cleanupLog Completed in 6ms
23 timing npm:load:configScope Completed in 0ms
24 timing npm:load:projectScope Completed in 1ms
25 timing npm:load Completed in 37ms
26 timing config:load:flatten Completed in 7ms
27 timing arborist:ctor Completed in 1ms
28 timing idealTree:init Completed in 1509ms
29 timing idealTree:userRequests Completed in 1ms
30 silly idealTree buildDeps
31 silly fetch manifest @react-native-community/datetimepicker@3.2.0
32 timing arborist:ctor Completed in 1ms
33 http fetch GET 304 https://registry.npmjs.org/@react-native-community%2fdatetimepicker 1811ms (from cache)
34 silly fetch manifest react@16.13.1
35 http fetch GET 304 https://registry.npmjs.org/react 104ms (from cache)
36 silly fetch manifest react-native@https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz
37 http fetch GET 304 https://codeload.github.com/expo/react-native/tar.gz/sdk-41.0.0 1704ms (from cache)
38 silly fetch manifest react-native-windows@>=0.62
39 http fetch GET 304 https://registry.npmjs.org/react-native-windows 140ms (from cache)
40 silly fetch manifest react@17.0.1
41 timing idealTree Completed in 7360ms
42 timing command:install Completed in 7372ms
43 verbose stack Error: unable to resolve dependency tree
43 verbose stack     at Arborist.[failPeerConflict] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1210:25)
43 verbose stack     at Arborist.[loadPeerSet] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1203:30)
43 verbose stack     at async Arborist.[loadPeerSet] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1153:11)
43 verbose stack     at async Arborist.[buildDepStep] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:880:11)
43 verbose stack     at async Arborist.buildIdealTree (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:218:7)
43 verbose stack     at async Promise.all (index 1)
43 verbose stack     at async Arborist.reify (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:136:5)
43 verbose stack     at async Install.install (/usr/lib/node_modules/npm/lib/install.js:150:5)
44 verbose cwd /media/chaitu/prash/project001-main
45 verbose Linux 5.4.0-74-generic
46 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
47 verbose node v16.3.0
48 verbose npm  v7.15.1
49 error code ERESOLVE
50 error ERESOLVE unable to resolve dependency tree
51 error
52 error While resolving: undefined@undefined
52 error Found: react@16.13.1
52 error node_modules/react
52 error   react@"16.13.1" from the root project
52 error   peer react@">=16.8.3" from @react-native-community/datetimepicker@3.2.0
52 error   node_modules/@react-native-community/datetimepicker
52 error     @react-native-community/datetimepicker@"3.2.0" from the root project
52 error   1 more (react-native)
52 error
52 error Could not resolve dependency:
52 error peer react@"17.0.1" from react-native-windows@0.64.12
52 error node_modules/react-native-windows
52 error   peer react-native-windows@">=0.62" from @react-native-community/datetimepicker@3.2.0
52 error   node_modules/@react-native-community/datetimepicker
52 error     @react-native-community/datetimepicker@"3.2.0" from the root project
52 error
52 error Fix the upstream dependency conflict, or retry
52 error this command with --force, or --legacy-peer-deps
52 error to accept an incorrect (and potentially broken) dependency resolution.
52 error
52 error See /home/chaitu/.npm/eresolve-report.txt for a full report.
53 verbose exit 1

Do not know why.

Hi @iamchaitu

Please post the dependencies and devDependencies sections from your package.json.

Also, if you want to use react-native-date-picker, it would probably be better to upgrade to Expo SDK 42. But first let’s get to the bottom of this npm install problem before worrying about upgrading or installing react-native-date-picker.

Hai @wodin, thanks for your response. I have resolved the problem after downgrading my node version from 16 to 14.

1 Like

Thanks for following up @iamchaitu!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.