Skip to content

Expo install - Could not resolve dependency: peer react-native@">=0.65.0" #627

@fnipo

Description

@fnipo

Environment

System:
OS: Windows 10 10.0.19042
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 13.71 GB / 31.85 GB
Binaries:
Node: 16.13.2 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Version 2021.1.0.0 AI-211.7628.21.2111.8092744
Visual Studio: 16.4.29728.190 (Visual Studio Community 2019)
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: ^0.64.3 => 0.64.3
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found

Expo CLI 5.0.3 environment info:
System:
OS: Windows 10 10.0.19042
Binaries:
Node: 16.13.2 - C:\Program Files\nodejs\node.EXE
npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 2021.1.0.0 AI-211.7628.21.2111.8092744
npmPackages:
expo: ~44.0.0 => 44.0.5
react: 17.0.1 => 17.0.1
react-dom: 17.0.1 => 17.0.1
react-native: ^0.64.3 => 0.64.3
react-native-web: 0.17.1 => 0.17.1
Expo Workflow: managed

Platforms

Both

Versions

Description

Setup for Expo projects doesn't work with expo install command

Expo currently supports react-native up to its 0.64.3 version and is unable to find the compatible react-native-modal-datetime-picker@10.2.0 package

I am not sure whether it requires changes on the react-native-modal-datetime-picker or expo-cli repo for the mapping to work correctly.

Reproducible Demo

Command:

expo install react-native-modal-datetime-picker @react-native-community/datetimepicker

Output:

Installing 1 SDK 44.0.0 compatible native module and 1 other package using npm.
> npm install

added 1 package, and audited 902 packages in 2s

30 packages are looking for funding
  run `npm fund` for details

15 vulnerabilities (4 low, 10 moderate, 1 high)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

> npm install --save react-native-modal-datetime-picker
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: habitodo@1.0.0
npm ERR! Found: react-native@0.64.3
npm ERR! node_modules/react-native
npm ERR!   react-native@"0.64.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native@">=0.65.0" from react-native-modal-datetime-picker@13.0.1
npm ERR! node_modules/react-native-modal-datetime-picker
npm ERR!   react-native-modal-datetime-picker@"*" 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\fpnip\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\fpnip\AppData\Local\npm-cache\_logs\2022-02-04T12_34_44_501Z-debug.log

npm exited with non-zero code: 1
Error: npm exited with non-zero code: 1
    at ChildProcess.completionListener (C:\Users\fpnip\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\spawn-async\src\spawnAsync.ts:65:13)
    at Object.onceWrapper (node:events:510:26)
    at ChildProcess.emit (node:events:390:28)
    at ChildProcess.cp.emit (C:\Users\fpnip\AppData\Roaming\npm\node_modules\expo-cli\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (node:internal/child_process:1064:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:390:28)
    at Pipe.<anonymous> (node:net:687:12)
    ...
    at Object.spawnAsync [as default] (C:\Users\fpnip\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\spawn-async\src\spawnAsync.ts:26:19)
    at NpmPackageManager._runAsync (C:\Users\fpnip\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\package-manager\src\NodePackageManagers.ts:166:31)
    at NpmPackageManager.addAsync (C:\Users\fpnip\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\package-manager\src\NodePackageManagers.ts:108:18)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at actionAsync (C:\Users\fpnip\AppData\Roaming\npm\node_modules\expo-cli\src\commands\installAsync.ts:125:3)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions