vouch-opensource / krell

Simple ClojureScript React Native Tooling
Eclipse Public License 1.0
673 stars 37 forks source link

Install deps errors with latest react-native #143

Closed girishso closed 2 years ago

girishso commented 2 years ago

Followed the steps from https://reactnative.dev/docs/environment-setup to start a new project

npx react-native init AwesomeProject
cd AwesomeProject
npx react-native start
npx react-native run-ios

The project opens up in iOS simulator, changes are hot reloaded.

Created following deps.edn (copied from the wiki)

{:deps {io.vouch/krell {:git/url "https://github.com/vouch-opensource/krell.git"
                        :sha "08f2bfea96aa48feb8511851e37f5948453986e5"}
        io.vouch/reagent-react-native {:git/url "https://github.com/vouch-opensource/reagent-react-native.git"
                                       :sha "0fe1c600c9b81180f76b94ef6004c2f85e7d4aa0"}
        reagent/reagent {:mvn/version "0.10.0"
                         :exclusions [cljsjs/react cljsjs/react-dom]}}}

Try to install deps

>  clj -M -m cljs.main --install-deps

npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: mox3@0.0.1
npm ERR! Found: react@16.13.0
npm ERR! node_modules/react
npm ERR!   react@"16.13.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"17.0.2" from react-native@0.65.1
npm ERR! node_modules/react-native
npm ERR!   react-native@"0.65.1" from the root project
npm ERR!   peer react-native@">=0.60.0" from react-native-tcp-socket@5.2.0
npm ERR!   node_modules/react-native-tcp-socket
npm ERR!     react-native-tcp-socket@"5.2.0" from the root project
npm ERR!

Looks like version mismatch between react-native and react. Any hints?

girishso commented 2 years ago

Switched reagent to latest version 1.1.0 and it works!

reagent/reagent {:mvn/version "1.1.0"
                         :exclusions [cljsjs/react cljsjs/react-dom]}