yarn add react-native
warning "[email protected]" has incorrect peer dependency "[email protected]".
after that
yarn add [email protected]
warning "[email protected]" has incorrect peer dependency "[email protected] || 0.14.x || ^15.0.0-0 || 15.x".
warning "[email protected]" has incorrect peer dependency "react@^15.5.4".
warning "[email protected]" has incorrect peer dependency "react@^15.4.2".
warning "[email protected]" has incorrect peer dependency "react@>=15.2.1".
lets say we can ignore and do not use enzyme, react-test-renderer, reactotron-react-native but react-dom is important.
Steps to reproduce it:
ignite new v3
cd v3
yarn add react-native
yarn add [email protected]
react-native run-android
The https://github.com/infinitered/ignite-ir-boilerplate boilerplate has been updated to 0.45.1. Just waiting a release.
You can also control the version of react native by ignite new MyApp --react-native-version 0.45.1.
Hi @skellock, i have a related issue with Ignite v2.0.0.
I just created a new project with ir-boilerplate and have dependencies warnings.
Command: ignite new TestApp --min
Warning from npm cli:
npm ERR! peer dep missing: [email protected] || 0.14.x || ^15.0.0-0 || 15.x, required by [email protected]
npm ERR! peer dep missing: react@^15.4.2, required by [email protected]
npm ERR! peer dep missing: react@>=15.2.1 || 16.0.0-alpha-6 || 16.0.0-alpha-12, required by [email protected]
npm test results in 5 failed and 3 passed tests for react-dom dependencies (I think)
Here is my ignite doctor log:
platform darwin
arch x64
cpu 2 cores Intel(R) Core(TM)2 Duo CPU P7550 @ 2.26GHz
directory /Users/edolix/Dev/tests/v2/TestApp
JavaScript
node 8.1.3 /usr/local/bin/node
npm 5.0.3 /usr/local/bin/npm
yarn 0.27.5 /usr/local/bin/yarn
React Native
react-native-cli 2.0.1
app rn version 0.45.1
Ignite
ignite 2.0.0 /usr/local/bin/ignite
Android
java 1.8.0_131 /usr/bin/java
android home - /usr/local/share/android-sdk
iOS
xcode 8.3.3
Am I doing something wrong?
Thanks
@edolix I can confirm this on a similar issue. On a new ignite 2.0.0 project I get following on first install:
npm WARN [email protected] requires a peer of [email protected] || 0.14.x || ^15.0.0-0 || 15.x but none was installed.
npm WARN [email protected] requires a peer of react@>=15.2.1 || 16.0.0-alpha-6 || 16.0.0-alpha-12 but none was installed.
npm WARN [email protected] requires a peer of react@^15.4.2 but none was installed.
Apparently the solution is to either downgrade react, or wait for RN 0.16 to become stable, as enzyme does not support alpha releases:
@aschrijver I have downgraded React but the results are a lot of other dependencies error/warning. You have to downgrade almost "all" libraries
Yes, I am also in the process of downgrading. Not happy about it. Getting all kinds of issues.
BTW react-native is not going to change relying on alpha's. Here's their explanation: https://github.com/airbnb/enzyme/issues/893#issuecomment-301558517
@skellock Please reopen as the issue is still at play.
@edolix I found the issue with the tests. I had to add -u --no-cache to package.json:
"test": "NODE_ENV=test jest -u --no-cache"
Found it out by accident, while sorting out the nightmare of getting VS Code to hit my breakpoints while debugging. Still working on it..
[UPDATE: Not sure on this anymore. Encountered millions of errors, red screens and other horrors setting up the stack. Terrible dev experience. Can now finally do some work after downgrading Node from v8 to v7 (see: [stackoverflow question](https://stackoverflow.com/questions/45056952/debugging-jest-unit-tests-with-breakpoints-in-vs-code-with-react-native)).]
There鈥檚 a lot of drift in this issue. For that reason I鈥檓 going to keep this closed.
Let me address what are legit issues tho.
So ya, enzyme is not working with the latest React Native. It is currently being rewritten and will be available soon though. This is frustrating to me because we were happy with how our testing was going, and now we can鈥檛 use it short term. 馃檨
The warnings you see when installing are because the peer dependencies of those libs don鈥檛 match. In the case of reactotron-react-native, I typed the dependency version wrong (-16 vs .16). I will fix that once I get out of bed here. 鈽猴笍 (harmless warning btw)
As far as red screens are concerned, I鈥檇 need to see the specific traces to help. One thing that snags me often when switching React Native versions is caches. watchman watch-del-all can help. rm -rf node_modules helps as well.
With VS Code debugging in Node 8, yes that鈥檚 a problem. Both the node and code teams are awesome and we should see a fix soon.
Addressing the horrible dev experience when all this happens, yes. It sucks. We (as a community) can do better. One of my favourite talks at Chain React a few days ago was by Brent Vatne pointing this out. That we need to do better. React Native can be frustrating to deal with fragile deps. Even the panel talk pointed this out.
Good news is: we (the community at large) care.
Speaking more to Ignite though. When we get foot swept by our dependencies, we need to get back up faster. We can improve here for sure.
The enzyme breakage was particularly painful.
Thanks for your help and background info!
I understand your frustrations all too well, and I'll also try to contribute to the community by linking issues, answering (my own and others) stackoverflow questions, etc.
For myself I've been busy about a week now trying to set things up, and no productive line of code written yet. Now looking into debugging setup (2 days, and counting).
I thought downgrading node to 7.10.1 and using VS Code fixed things for me, but it runs directly from disk, not the js bundle, so my node shims are all ignored. This is vscode-specific :(
About adding the --no-cache to jest task in package.json. This _does_ seem to work getting rid of the 'Unexpected token import' errors, at least when I run tests in VS Code.
@skellock Thanks for the support and info and thanks @aschrijver too!
Having the same issue. Installed ignite yesterday.

Most helpful comment
There鈥檚 a lot of drift in this issue. For that reason I鈥檓 going to keep this closed.
Let me address what are legit issues tho.
So ya, enzyme is not working with the latest React Native. It is currently being rewritten and will be available soon though. This is frustrating to me because we were happy with how our testing was going, and now we can鈥檛 use it short term. 馃檨
The warnings you see when installing are because the peer dependencies of those libs don鈥檛 match. In the case of
reactotron-react-native, I typed the dependency version wrong (-16 vs .16). I will fix that once I get out of bed here. 鈽猴笍 (harmless warning btw)As far as red screens are concerned, I鈥檇 need to see the specific traces to help. One thing that snags me often when switching React Native versions is caches.
watchman watch-del-allcan help.rm -rf node_moduleshelps as well.With VS Code debugging in Node 8, yes that鈥檚 a problem. Both the node and code teams are awesome and we should see a fix soon.
Addressing the horrible dev experience when all this happens, yes. It sucks. We (as a community) can do better. One of my favourite talks at Chain React a few days ago was by Brent Vatne pointing this out. That we need to do better. React Native can be frustrating to deal with fragile deps. Even the panel talk pointed this out.
Good news is: we (the community at large) care.
Speaking more to Ignite though. When we get foot swept by our dependencies, we need to get back up faster. We can improve here for sure.
The enzyme breakage was particularly painful.