why can't create new app in react native - windows

I'm beginner in react-native and I doing steps in a website of react-native
and the app is working right,
but after doing some update
npm i react#latest --save
npm i react-native#latest --save
react-native upgrade
after that, I can't create any project by
react-native init projectName
I get this error
image link

This is actually a problem on Windows with the latest version of react native (0.56)
GitHub Issue
Try using version 0.55.4 by typing react-native init --version="0.55.4" projectName

Not every version of react-native is compatible with every version of react. In the screenshot you sent, it says you need react#16.4.1 for react-native#0.56.0. Try doing npm i react#16.4.1 --save and then try react-native init projectName again.

Related

How do I update just the "nativescript-vue" package in my project?

I'm new to Nativescript and Mobile app development in general. How do I update just the "nativescript-vue" package in my project? My project has nativescript-vue version 2.4.0, but I'm trying to update to version 2.6.1.
Here is a snippet from the packson.json in my project.
"#nativescript/theme": "~2.2.1",
"nativescript-vue": "~2.4.0",
"tns-core-modules": "~6.3.0"
Either change in package.json to "nativescript-vue": "~2.6.1", and run npm install or simply run npm update nativescript-vue.
Ok, I figured out how to do it.
From the terminal I ran the following command...
npm i nativescript-vue#2.6.1
You could open the Project in vscode and run the command from the terminal there too.
To get the latest version run
npm i nativescript-vue#latest

createBrowserApp is not working with react-navigation v5

with new react-navigation v5 it's become impossible to use it with react-native-web.
just importing createBrowserApp throws an error
import {createBrowserApp} from "#react-navigation/web";
show following error in #react-navigation/web/dist/Link.js
TypeError: (0 , _core.withNavigation) is not a function
does anybody know how to use now react-navigation v5 with react-native-web? I need url history in path, but now it has became impossible.
expo install react-navigation react-native-gesture-handler react-native-reanimated react-native-screens
npm i react-navigation-stack
npm i #react-navigation/web
install with expo that is why expo would look for the correct version of the react–navigation libraries that’d work with the expo version that’s installed in your project.
and keep with this tutorial
https://codersera.com/blog/how-to-do-navigation-in-react-native-web-in-2020/

React Native cannot find variable $refresh req$

React Native cannot find variable $refresh req$
Package.JSon :-
"metro-react-native-babel-preset": "^0.56.0",
Downgrade version
"metro-react-native-babel-preset": "^0.54.1",
and Delete your package-lock file and delete npm module folder
and after that
1). npm install
2). react-native link
3). react-native run-android // react-native run-ios
to Solve your issue
Happy Codding Cheers!

nativescript 'tns run android' throws ClassNotFoundException

I did a fresh clone of the nativescript grocery git repo, and checked out the angualr-start branch, did 'platform add android', and then 'tns run android' (which my android device connected)
The app came up and displayed this error: pastebin.com/1YbThGkZ
perhaps the most significant part of the error being this:
java.lang.ClassNotFoundException: Didn't find class "com.tns.FragmentClass" on path: DexPathList[[zip file "/data/app/org.nativescript.groceries-1/base.apk"],nativeLibraryDirectories=[/data/app/org.nativescript.groceries-1/lib/arm, /data/app/org.nativescript.groceries-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /systementer code here/lib]]
Solution: upgrade to native script (and tns-core-modules) v2.1
upgrade to native script (and tns-core-modules) v2.1
sudo npm install nativescript -g --unsafe-perm
tns plugin remove tns-core-modules
tns plugin add tns-core modules

Using React-Native run in Xcode counter an error

I get new version of react-native and when I initialize a new project and run it in Xcode I have the error:(react-native 0.9 IOS run error).
Please help me!
TransformError:
/Users/lizi/Desktop/ATFProject/node_modules/react-native/node_modules/react-transform-hmr/node_modules/react-proxy/node_modules/react-deep-force-update/lib/index.js:
[BABEL]
/Users/lizi/Desktop/ATFProject/node_modules/react-native/node_modules/react-transform-hmr/node_modules/react-proxy/node_modules/react-deep-force-update/lib/index.js:
Unknown option:
/Users/lizi/Desktop/ATFProject/node_modules/react-native/node_modules/react-transform-hmr/node_modules/react-proxy/node_modules/react-deep-force-update/.babelrc.stage
It is an error generated when you transpiling with babel. Make sure the Node version is latest. Clear npm cache with $ sudo npm cache clean and start a new project using RN again.

Resources