WrathChaos/react-native-typescript-boilerplate

Problems with installing from fresh with node v16.15.1

MadsFrost opened this issue · 5 comments

Hi @WrathChaos, great template, as mentioned in topic header I have problems installing the node modules with a fresh install using node version 16.15.1.
There is also no node version specified in package.json. Is there a specific version you have to use:)?

Error log:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @react-native-community/async-storage@1.12.1
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"17.0.2" from the root project
npm ERR!   peer react@">= 16.x.x" from @freakycoder/react-native-bounceable@0.2.5
npm ERR!   node_modules/@freakycoder/react-native-bounceable
npm ERR!     @freakycoder/react-native-bounceable@"^0.2.5" from the root project
npm ERR!   19 more (@freakycoder/react-native-helpers, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8" from @react-native-community/async-storage@1.12.1
npm ERR! node_modules/@react-native-community/async-storage
npm ERR!   @react-native-community/async-storage@"^1.12.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react@16.14.0
npm ERR! node_modules/react
npm ERR!   peer react@"^16.8" from @react-native-community/async-storage@1.12.1
npm ERR!   node_modules/@react-native-community/async-storage
npm ERR!     @react-native-community/async-storage@"^1.12.1" 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 /Users/MadsFrost/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/MadsFrost/.npm/_logs/2022-06-30T08_49_18_854Z-debug-0.log

Ah you opened two issues :D

Hello @MadsFrost
Thank you for using this template :)

Since you closed the issue, can you also share how to solve it?

CleanShot 2022-06-30 at 3 38 10@2x

I am using this node version :) Can you try with the v16.10.0

@WrathChaos Hi, I never solved it, I just downgraded to node v14. I just closed the previous issue as I accidentally created a duplicate hehe.

@WrathChaos v16.10.0 worked fine, I would perhaps suggest adding some sort of engine for all these dependencies in package.json:

Package.json

...
"engine": {
    "node": ">=16.10.0",
    "npm": ">=7.24.0"
  },
...

Awesome advice @MadsFrost
I will do it now :)

Thank you sir

Hey @MadsFrost,
I added the on 3.3.1 version

Thank you for the advice :)