Hi,
I'm starting to learn React Native, and found out that React Native development can be done on Windows also (thanks to UWP). And, I find this blog (https://shift.infinite.red/getting-started-with-react-native-development-for-windows-ba23a4be90b6#.c117cuwmy) which details the steps on how to install and create React Native project and configure for Windows development. I'm running Windows 10 and have already set developer features to Developer mode under Settings. However, when I tried to initialize windows (run react-native windows), I got an error saying "Could not find [email protected].. Latest version of react-native-windows is 0.40.0-rc.1, try switching to [email protected].." (see screen capture below)
I changed react-native dependencies in package.json under my project folder to 0.39.1 (as mentioned in the blog), but still it doesn't work.
"dependencies": {
"react": "15.4.2",
"react-native": "0.41.2"
},
The CLI windows plugin is at [email protected]
Did I miss an important step which caused this error? Any help is greatly appreciated.
You should specify version 0.39.2 or 0.40.0 when creating your React Native project such as
react-native init --version=0.40.0 sampleApp
@Juniuz we haven't published the official version for [email protected] or 0.41.0 yet, but we have published release candidates for both.
Can you try:
react-native windows --windowsVersion 0.41.0-rc.0
@Juniuz Also, I've just updated that blog post with the relevant information. Thanks for mentioning it! :)
@rozele , thanks for the update. I used the CLI react-native windows --windowsVersion 0.41.0-rc.0
and it works like a charm. I was now able to initialize windows for react-native.
@kevinvangelder , thanks for updating your blog. I have initialized windows successfully and installed Windows 10 SDK v.10.0.10586.0 on my machine. However, when I run react-native run-windows
, I got another error (screen capture below) saying "Failed to deploy". I was expecting that React-Native Server will start as well the app, but it didn't. :(
Should I restart my machine after installing all the packages and run react-native run-windows
again?
Not sure what's wrong there. The manual way to do it is to open the Solution in Visual Studio and run it, and from the command line run react-native start
.
It looks like there's a space in one of the directories in the path. The clue is it says 'Ltd\MyProject...' is being used as an argument. I'll bet the path is something like C:\Users\XXX Ltd\MyProject... . Pretty sure there's already any issue filed for this, but can we at least close this issue (can't find 0.41) and open a new one?
@matthargett , sounds good to me. We can close this one, that's fine. The last issue that I had raised isn't related anymore with the first issue I guess.
Most helpful comment
@Juniuz we haven't published the official version for [email protected] or 0.41.0 yet, but we have published release candidates for both.
Can you try: