-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Description
Is react-native a complete joke on Windows?
Just to summarise the facts.
Yesterday I received the source code of a react-native app "built" on linux for the last 2 months.
ENV: ubuntu 16.06, Node 6.10.3, npm 3.10.10
So I just have to build it on my windows machine to change some hardcoded texts.
For the past 30 hours I tried:
Installing different versions of Node, npm (learnt about nvm-windows and used it to try different combination for Node - Npm (Node 6.1.3, Node 6.11.2, npm 3.10.10., npm 4.6, npm 5... but npm5 doesn't work with react-native at all)
Installed and uninstalled JDK 7, JDK 8, Android SDK, watchman, expo, yarn, chocolatey, python
Reinstalled JAVA, added whatever is needed to system PATH as environment variables JAVA_HOME, JAVA_SDK_HOME, ADP
Different combinations of versions for react, react-native (0.46, 0.47, 0.44), native-base
Changed buildToolsVersion for some packages from 23.1.0. to '25.0.0'
I've tried npm start
, npm --clear-cache
, react-native start
, npm install && npm start -- --reset-cache
I've completely uninstalled watchman - since that was a frequent problem to others. It needed multiple times of running watchman watch-del-all
I've used rm -rf ./node_modules
and also deleted the node_modules by hand a number of times... to have a clean start of the dependency hell...
I've read more than 50+ issues and developers' posts and tried their "fixes" and "combinations" but 50% of them were for linux or mac.
I've tried the examples from the documentation of react-native with top notch version 0.4.7 but nothing builds.
I've tried a pure native-react app (without native code installed with create-react-native-app AwesomeProject) - nothing but build errors for duplicate modules,
I tried react-native start
, react-native run-android
.
I've tried building it from the console directly with graddle.
I've tired building it with a different environment, platform SDK version. through Android Studio
I have 5 pure example projects: AwesomeProject, AwesomeProject2 (made with native-starter-kit which is "A Starter Kit for React Native + NativeBase + React Navigation + Redux + CodePush Apps (iOS & Android)" - but after all... I've given it a try.) expo-app - made with this exp init your-project-name
Most of the time the errors were:
#14209 - which doesn't have a solution for 4 months
other frequent errors were:
Off topic:
And in the meantime I received another native Android project which needed a little fix... I have set up the project, made the fix and built it in 20 minutes... and I LITERALLY forgot that I've done this job still fighting with setting up and trying to build anything with react-native... even samples and hello-words.
Something is terribly wrong with react-native under Windows.
Also, I'm willing to pay real money at the moment if someone gives me a working react-native project and documented step-by-step instructions and environment setup.
Peace out!
P.S.
To be completely honest, I've managed to build an empty "hello world" app twice made of:
{
"name": "rn_test_app",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.0.0-alpha.12",
"react-native": "0.47.2"
},
"devDependencies": {
"babel-jest": "20.0.3",
"babel-preset-react-native": "3.0.1",
"jest": "20.0.4",
"react-test-renderer": "16.0.0-alpha.12"
},
"jest": {
"preset": "react-native"
}
}
and built with: react-native start
in one console, and react-native run-android
in another console...
Yes, if you just go with react-native run-android results in new "cmd" opening and this results in different errors
p.s.2
Today i found this: https://arielelkin.github.io/articles/why-im-not-a-react-native-developer
It couldn't be more true.