i started doing a react tutorial from youtube, following along with the instructions on setting up a basic react app and i ran into this error actually trying to create the app via the terminal in VScode. have you ever encountered this? any fixes?enter image description here (see highlighted part of screenshot)
[terminal error][2]
Start on a fresh project directory eg my-first-project
Then open that folder in a your VSCode and in the VSCode cli, run npx create-react-app .(the . indicates that it should install it in the current directory)
then open src folder and start adding your own components
Related
I am an intermediate react developer.
I was running my react native app peacefully without any problems untill one morning, i did not change anything in my codebase but when i tried to run the app through expo client, it started showing the error in the screenshot.
I have checked and checked this platform, and not a single solution.
I am currently using expo sdk 43 (managed workflow) please help...this is my first time posting here.
This is the error below;
Can't find variable: require
http://127.0.0.1:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&minify=false:5:24.globalcode#http://127.0.0.1:19000/node_modules /expo/AppEntry.bundle?platform=android&dev=true& hot=false&minify=false:720:3.
Click here for the screenshot of the error
I got it fixed.
See what i did,
I created a fresh expo project using "expo init"
Then copied all my files into the new project "except node_modules and .expo folders".
Then i ran "npm install"
Viola!!! Everything works fine now
Note: i tried removing "node_modules" before over and over again and it dint work.
The only thing that worked was starting a new project and following the above steps.
I am fairly new to React Native. I am building a basic app using expo-cli. I don't have a deep understanding on how it works, but I've been following tutorials online on how to use it. Today, I was working on it and used 'npm start' command to launch the expo portal so I could demo my app on a virtual machine but it says it can no longer find the link to the .json file. Can someone please help me to get it working again.
Looks like you're one directory up? Try cd WhatsUp and then run npm start again.
I have created a project HelloWorld in react native by using react-native init HelloWorld
When I run the project by using react-native run-android command, i am facing error
could not unzip gradle-5.4.1-all.zip
I have tried the following
1.updated react native
2.wipe the data from Emulator.
To resolve this kind of error the following steps are used
Open My computer.
Navigate the following folder
C:\Users\UserName.gradle\wrapper\dists
Delete the 'gradle-5.4.1-all.zip' folder
Run React-native project by using react-native run-android command.
The system will download updated gradle-5.4.1-all.zip file so
internet connection must be ON
I added a vector icon package in my React Native app. But After adding vector icon library I am trying to rebuild project using
**npm run android
react-native link**
But it's giving me an error
npm err missing script android react native
I have tried many solutions of updating package.json file from Github and I have tried to change the path of the environment but still same
I think you are using the wrong command to make debug build.
Following these steps:
install vector icon
link it from your project root directory using the command react-native link your_package_name
Use this command from your project root directory to make build react-native run-android
I am a beginner at React Native and have begun to take some time off to work on my new app project. I have noticed that there is a lot of difference with RN old and the new version. One is the combination index.js and App.js instead of index.android.js & index.ios.js.
The other is the new folder structure after react-native init-ios/android is completely changed. Following the standard installation guidelines and creating RN project, I do not see App directory created at all (the only folders are tests, android, iOS, node_modules.
Have you seen this after the latest upgrade? How do I rectify this? Any suggestions will be great.
Create your own app directory, put all your logic in there.
Import the root file into App.js in root folder.
$ react-native run-android or $ react-native run-ios` and app should run as expected.
You can use create-reactive-app with expo if don't wish to use the react-native-cli. See react-native docs, getting started for more information.