The development server returned error code 500 - react-native

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

Related

I am unable to install npm package

I have made an empty folder and trying to install the npm package inside the folder so I can start to write an application. I have been attempting to install package JSON with npm install -y but it only installs the package-lock-JSON but it's showing me the following error. I even reinstalled the node on my PC didn't work.
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\hasan\Desktop\Githubfiles\node _express_mongodb/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\hasan\Desktop\Githubfiles\node _express_mongodb\package.json'
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\hasan\AppData\Local\npm-cache_logs\2022-12-06T12_18_28_964Z-debug-0.log
PS C:\Users\hasan\Desktop\Githubfiles\node _express_mongodb>

npm start isn't working in new React apps?

I've removed and reinstalled NPM and Node, still no fix. Here's the error code after I create-react-app and input npm start.
npm ERR! syscall open
npm ERR! path /Users/carriepresley/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/carriepresley/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent```
Use cd to the directory where package.json is located and then run the npm start command. This will work.

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..

How to fix react native expo starting code?

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.