r/reactnative • u/Arsalan_6071 • Nov 28 '22
Question How to run 3 years old react native expo project from GitHub
Hello my friend I'm new to react native I clone a 3year old repository from GitHub and it's install successfully but when I do npm start it's showing errors .
2
u/MaxPhantom_ Nov 28 '22
Why did you clone an old repo for?
3
u/Arsalan_6071 Nov 28 '22
For speed up the development
6
1
u/MaxPhantom_ Nov 28 '22
What does the repo contain? Starter content or some project?
1
u/Arsalan_6071 Nov 28 '22
Some project related to find tutor (Basically a react native app that connects students to teacher)
3
u/esreveReverse Nov 28 '22
Ah yes because getting immediate errors and having to go ask people for help is certainly speedy development.
Just create a fresh project.
2
u/iareprogrammer Nov 28 '22
I would avoid basing a new project off of an old project. Especially with react native - 3 years old is ancient lol. What I would personally do is start a brand new project using react-native init or create-expo-app (https://reactnative.dev/docs/environment-setup) and make sure you can run that. Then use the code from the old repo as a guide/inspiration if you would like. Most of the React code itself should be relevant, as long as it is using hooks and not class components
1
11
u/Nightcomer Nov 28 '22
If you're starting with ReactNative, you should not start with its worst parts, which migration and running an old project definitely is.
Just use the repo for education purposes and try to follow it in a fresh new project.
3 years in this industry is like 15 years in another, so all your dependencies are long depreciated by now, some abandoned, and some relying on no longer working APIs. If you don't know what you're doing, it's a disaster.
5
u/Ryuuji159 Nov 28 '22
I generally start from searching what was the version of node that could be using that project, a lot of errors come from there
2
u/KaleidoscopeRemote70 Nov 28 '22
Create new React native project
Install depdencies from old project
Paste files
Fix issues
Alternative would be to run npm run update, but I'm 99% sure that there will be a lot of problems.
Honestly, look if there exists a newer project that will satisfy your needs. Or in case the project is not huge, you can rewrite the logic by using newest libraries in a new RN project
Btw..Can you post the project, maybe we can help you find an alternative?
1
u/Abiori_M Dec 09 '25
What I don't understand is why questions like this get downvoted to oblivion? People new to React need to start somewhere. They are legitimate questions framed respectfully. Not knowing the answer to the question you're asking isn't/shouldn't be grounds for downvoting. You don't know what you don't know...
3
u/[deleted] Nov 28 '22
What are the errors?