How to fix react native expo starting code? - react-native

When I type the normal expo code and start my project, I get the following error:
npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git#github.com/expo/react-native-maps.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Atharva Sawant\AppData\Roaming\npm-cache\_logs\2019-03-27T17_07_14_954Z-debug.log
Process exited with non-zero code: 1
Set EXPO_DEBUG=true in your env to view the stack trace.

I searched for errors and found a solution.
I drew up the answer by referring to the link.
I was able to get it to work by first installing Git for Windows as mentioned earlier https://git-for-windows.github.io/.
Then, instead of opening up a regular command prompt and issuing the apm install command, go to your Windows Start menu and open up Git CMD. Run the command there and it should work.
or
you try add GIT to $PATH
If you can't use Set, try adding it using Setx.
Syntax example is:
setx PATH "%PATH%;C:\Program Files\MySQL\MySQL Server 5.5\bin" /M
If you have any further questions, please leave a comment.

Related

I am installing React Native CLI but this error is continuously persisting

Its been 5 days since I am getting this error. I have tried uninstalling everything and reinstalling it again from scratch but this error isnt going anywhere.When ever I run "npm start" it gives me this
ProjectName#0.0.1 start
node node_modules/react-native/local-cli/cli.js start
npm ERR! code ENOENT
npm ERR! syscall spawn bash
npm ERR! path C:\Users\M Khalil\Desktop\ReactNative\myapp\ProjectName
npm ERR! errno -4058
npm ERR! enoent spawn bash ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\M Khalil\AppData\Local\npm-cache_logs\2023-02-01T08_45_52_276Z-debug-0.log
C:\Users\M Khalil\Desktop\ReactNative\myapp\ProjectName>
what should I do please I need serious help. I am getting late with my project
I tried googling and installing and reinstalling everything but it doesnt work

The development server returned error code 500

I want to run react-navigation.
It gives me this error for gesture handler. While I'm going to install gesture handler, the following error occurs.
Kindly give me the appropriate solution.
C:\Users\Farooq\FirstActivity>npm install --save react-native-gesture-handler
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/naver/hammer.js.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Farooq\AppData\Roaming\npm-cache\_logs\2020-02-11T21_17_29_196Z-debug.log
This is typical issue with windows environment.
First of all download git for windows from here
Then follow bellow steps
Open Your Environment Variables
Edit Path
Find your git location that been installed in your device. Example is C:\Program Files\Git\cmd
Add the git location to Path (make sure to add this to both user variables and system variables)
Apply the changes and restart your pc
Lastly, go back to your project and run npm install react-native-gesture-handler

how do you install native-base?

Here my errors with my commands.
Command i tried to execute:
npm install native-base --save
Here error output:
npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git#github.com/GeekyAnts/theme.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jaber\AppData\Roaming\npm-cache\_logs\2019-07-21T08_15_50_391Z-debug.log
First, install git on your system. Native Base need pull package from ssh://git#github.com/GeekyAnts/theme.git by git command.
Make sure your git location stay in system's path environment by using this command:
git --version

What should be the solution of the following problem?

I am trying to create a new React-Native project but I am getting the following error stack trace:
C:\Users\MY HP\Desktop\MyProjects\ReactNative\project01>expo init RunAtleast
? Choose a template: expo-template-blank
√ Please enter a few initial configuration values.
Read more: https://docs.expo.io/versions/latest/workflow/configuration/ · 100% completed
Extracting project files...
Customizing project...
Installing dependencies...
npm WARN deprecated core-js#1.2.7: core-js#<2.6.5 is no longer maintained. Please, upgrade to core-js#3 or at least to actual version of core-js#2.
npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git#github.com/expo/react-native-maps.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\MY HP\AppData\Roaming\npm-cache\_logs\2019-04-04T18_59_55_657Z-debug.log
Process exited with non-zero code: 1
Set EXPO_DEBUG=true in your env to view the stack trace.
Does anyone have any ideas on how to fix this error? Any help would be greatly appreciated!
Looks like the problem is with your installation of git under Windows. A quick search turned up this link: https://github.com/amplience/cms-javascript-sdk/issues/1
Perhaps you can find more ideas how to fix this following the discussion there?
It has been solves as I used npm cache clear --force and reinstalled npm install -g expo-cli. And the problem gets solved..thanks to the stackovelflow community for such types of help..

Problems in creating CRNA

Im just stared learning react Native, and while creating a CRNA I had this :
`C:\Users\Mohamed\Documents\Projet> expo init MoviesAndMe
? Choose a template: expo-template-blank
? Choose which workflow to use: managed
√ Please enter a few initial configuration values.
Read more: https://docs.expo.io/versions/latest/workflow/configuration · 100% completed
[17:21:41] Extracting project files...
[17:21:45] Customizing project...
[17:21:45] Installing dependencies...
npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git#github.com/expo/react-native-maps.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Mohamed\AppData\Roaming\npm-cache\_logs\2019-02-17T16_22_16_022Z-debug.log
[17:22:16] Process exited with non-zero code: 1
[17:22:16] Set EXPO_DEBUG=true in your env to view the stack trace.`