What should be the solution of the following problem? - react-native

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

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

How can i solve npm error on install -g yarn?

i want to run this command and install yarn
npm install -g yarn
but i get this error
npm ERR! code ENOENT
npm ERR! syscall spawn bash
npm ERR! path C:\Users\DigiMax\AppData\Roaming\npm\node_modules\yarn
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\DigiMax\AppData\Local\npm-cache\_logs\2021-07-03T15_03_24_683Z-debug.log
how can i solve this problem?
The quickest solution is npm cache clean and npm cache verify works in most cases.
According to docs.npmjs you should check your npm version and update if needed or reinstall it at worst.
Please, let us know if it worked
This problem solve by "running VSCode as administrator"

Can't install packages for Hardhat project

I wanted to create a project using Hardhat environment. I've tried following https://hardhat.org/getting-started/ tutorial from their side. In there, we have a TIP to install all required packages. Unfortunately when I run npm install --save-dev #nomiclabs/hardhat-waffle ethereum-waffle chai #nomiclabs/hardhat-ethers ethers first I can see a lot of warnings about deprecated packages and then
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/ethereumjs/ethereumjs-abi.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\(path)
I've tried installing ethereum-waffle with specific version selected etc. it always ends with the same error.
Do you know how to overcome it? Why so many packages are deprecated during install? Is this getting-started outdated and I should start hardhat project in some other way?
When you run npm install --save-dev #nomiclabs/hardhat-waffle ethereum-waffle chai #nomiclabs/hardhat-ethers ethers , you are installing both. The #nomicfoundation/hardhat-chai-matchers plugin is meant to be a drop-in replacement for the #nomiclabs/hardhat-waffle plugin. So having just one is okay. I recommend you to migrate and use the Hardhat Chai Matchers plugin.
Use this link for more information. => "https://hardhat.org/hardhat-chai-matchers/docs/migrate-from-waffle". I hope this helps out a little bit.

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