I'm trying to open existing React Native project in the emulator on Windows 10, but it throws this error:
undefined is not an object (evaluating '_reactNativeParse2.default.Object.extend')
I'm using 0.45.1 version of React Native. Backend is Parse Server. Why is this happening?
Found this on Github issues. Try this for now:
edit package.json -> Replace 0.45.1 with 0.43.4 for react-native
'rm -rf node_modules' //get rid of previous module installations based on 0.45.1
npm install
react-native link
react-native run-android // but in separate window be running 'npm start' first.
Related
I want to link a library in react native version 0.70.1 but I got a error error: unknown command 'link' after trying this command react-native link react-native-notification-sounds
Linking is automatic since React Native 0.60. So no need to run react-native link.
After installing the library -
on android, just rebuild the app
npm run android
on ios, install the pod before rebuilding the app
npx pod-install ios
npm run ios
React native is not build my project on cmd. Here is an error when I try to react-native run-android command
When I try it on Android Studio, it show second error. How can I fix it ?
I create a react native app in C9. Now, I want to develop this app on my local machine with android settings. I downloaded the project.
cd myProjectFolder
react-native start
npm install
react-native run-android
Also, I add a project name in package.json.
The error is below:
error Android project not found. Are you sure this is a React Native project?
If android project/folder does not exit in your root project then run :
react-native eject
I encountered this issue after I ruan ./gradlew clean. Tried serval methods but vain. Then I ran ./gradlew in the Android directory. It worked for me.
// Android
./gradlew
I am start learn to react native i am getting this when i have run my project build successfully but when open the app and get this error
I have to run my react native sample project like react-native init AwesomeProject
cd AwesomeProject
npm insatll
react-native run-android
and getting this errorerror: bundling failed: Error: Unable to resolve
module #babel/runtime/helpers/interopRequireDefault from
/Users/macbookpro/AwesomeProject/index.js: Module
#babel/runtime/helpers/interopRequireDefault does not exist in the
Haste module map`
before i have complete my all react native setup from this link
https://facebook.github.io/react-native/docs/getting-started.html
I am use macOS High Sierra 10.13.6
I would appreciate any help!
The issue can be fixed by using
npm add #babel/runtime
npm install
or
yarn add #babel/runtime
The issue is still open at this moment and will hopefully get resolved in new release.
For now,you can keep babel/runtime in devDependencies, but if you want to build a release build with this version of react-native, you need to put #babel/runtime in dependencies.
Here is the link for more details
I learning React-Native with Windows 10, Using Git Bash Command Prompt and Android Studio Emulator.
I have Install React Native globally by using npm install -g react-native-cli, I always create Project using react-native init ProjectName and
My Project Launching Method is
go into Project Directory with Git Bash CMD and execute react-native run-android.
I notice that most of the Project in Github are older version which consist of index.android.js and index.ios.js (My Project is newer version so it only have index.js). I been trying to open some older version Project, but it seem like it just does not launch with the method I mentioned above.
I also have tried react-native start method from How to open existing project in React Native? but I still not able to launch it.
The error message when I trying to launch the project is Command unrecognized. Make sure that you have run npm install and that you are inside a react-native project. This Problem only occur when I trying to launch project from Github, when I open my own Project there is no such problem.
ps. If I try use npm install in the project directory, it will have some error.
I have try to search from Net, most of their launching method are the same as above and does not work for me, so wanna ask that:
Is my method of launching React-Native is wrong in the very beginning?
Is there anything I need to install so that I can open old version React Native Project?
How can I open this project with my current situation? https://github.com/parkerdan/SampleNavigation
Thank you.
Extra Info (React Native CLI and Node Version):
$ react-native -v
react-native-cli: 2.0.1
react-native: n/a - not inside a React Native project directory
> process.version
'v8.9.4' (Node Version)
After whole day of Searching, I have found the Solution.
Whenever open any Project from Github or any sources, we have to ensure that the we have install all the required Dependencies, as Most of the Project using different type of dependencies that you may have not ever install.
Solution:
Download project
git clone https://github.com/parkerdan/SampleNavigation.git
2. Go to the Project Directory and Install dependencies (IMPORTANT)
Note: For unknown reason, npm install does not work
npm i
or yarn i
Run Project (or any launch method that work you)
react-native run-android
After you clone your project from git and cd to project folder, make sure you run npm install before you can react-native run-android.