Couldn't find the binary git - react-native

I am new to react-native.
After I changed "rn-nodeify":"10.3.0" to package.json under devDependencies and run npm install
my project
I followed this tutorial
If I run this command npm i --save-dev rn-nodeify#latest then this npm i --save-dev rn-nodeify#latest the below error occured.
C:\Users\mahima\Desktop\react-native\rn-node-js-master>npm install
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
> NodeJSExampleApp#0.0.1 postinstall
> ./node_modules/.bin/rn-nodeify --install --hack
'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code 1
npm ERR! path C:\Users\mahima\Desktop\react-native\rn-node-js-master
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c
./node_modules/.bin/rn-nodeify --install --hack
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mahima\AppData\Local\npm-cache\_logs\2022-08-29T06_39_05_153Z-debug-0.log
C:\Users\mahima\Desktop\react-native\rn-node-js-master>
How can I solve this error ?

Why not try this in package.json ?
"rn-nodeify":"10.3.0"
or any specific version which you want, usually package.json expects :
[packageName]:[version number]
alternative, why dont you try installing like this from terminal ?
npm i --save-dev rn-nodeify#latest

Make sure you have the GIT installed on your device and accessible globally. Try to type git --version in the CMD. If it returned that the command is not recognized and GIT already installed, then you need to add it to the PATH environment variable and make sure to try the command using a new CMD session

Related

Eror occurs when install nuxt and create app

Cannot instal nuxt and create app.
I used https://nuxtjs.org/docs/get-started/installation and https://github.com/nuxt/create-nuxt-app for creating app but this error occurs:
"create-nuxt-app"
is not internal or external
command executed by a program or batch file.
npm ERR! path C:\Users\Acer\Desktop\nuxt
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c create-nuxt-app "hacker-news"
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Acer\AppData\Local\npm-cache\_logs\2022-12-03T06_03_59_129Z-debug-0.log```
Please help!
PS: node js and npm are installed
Figured it out.
npm cache clean --force (sudo if needed)
npm install

error while installing npm error for version

I am trying to install npm to the code i am facing the below issue.
Command i try : npm install
or
npm -g install npm
npm cache clean -f
npm install -g n
below is the error:
sh: patch-package: command not found
npm ERR! code 127
npm ERR! path XXXX
npm ERR! command failed
npm ERR! command sh -c patch-package
If you're using yarn you can run yarn patch-package <args>
Otherwise ./node_modules/.bin/patch-package <args>
Or add ./node_modules/.bin to your $PATH environment variable (I prefer doing this)

npm ERR! code ENOTEMPTY npm ERR! syscall rename

when I try to initialize a react-native project I am getting this error. Anyone know how to resolve this please help
i am using mac
Need to install the following packages:
react-native
Ok to proceed? (y) y
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/codelanticdeveloper/.npm/_npx/7930a8670f922cdb/node_modules/react-native
npm ERR! dest /Users/codelanticdeveloper/.npm/_npx/7930a8670f922cdb/node_modules/.react-native-QIQKGFeg
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/codelanticdeveloper/.npm/_npx/7930a8670f922cdb/node_modules/react-native' -> '/Users/codelanticdeveloper/.npm/_npx/7930a8670f922cdb/node_modules/.react-native-QIQKGFeg'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/codelanticdeveloper/.npm/_logs/2022-02-16T15_54_46_715Z-debug-0.log
where it says...
directory not empty, rename '/Users/codelanticdeveloper/.npm/_npx/7930a8670f922cdb/node_modules/react-native' -> '/Users/codelanticdeveloper/.npm/_npx/7930a8670f922cdb/node_modules/.react-native-QIQKGFeg'
delete the file after the arrow and try again
rm -rf '/Users/codelanticdeveloper/.npm/_npx/7930a8670f922cdb/node_modules/.react-native-QIQKGFeg'
Try deleting all the files in the node modules that end with a similar names, like '*-QIQKGFeg'
I did it manually and it worked for me
I also had this problem and fixed it by:
Deleting the problematic Expo files here per the instructions here I'm trying to reinstall expo-cli package globally with the command sudo npm install --g expo-cli note that I try --force
In the terminal, running nvm install 16.14.0 (this will download the correct Node.js LTS release that is required by Expo)
In the terminal, running brew install watchman (this is required by Expo)
In the terminal, running npm install --global expo-cli (globally downloading Expo again)
In the terminal, running expo init my-app to finally create the new app successfully!

npm install gives '.' is not recognized as an internal or external command, operable program or batch file. error

I'm trying to run an existing project, but I'm stuck at install phase.
npm install gives me the following error:
npm ERR! path C:\Users\~\Source\node_modules\firebase\node_modules\grpc
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c ./node_modules/.bin/node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! '.' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
What could be causing the problem?
I already tried the following commands/workarounds, but this gives me the same error:
npm install --build-from-source #grpc/grpc-js
npm install --build-from-resources
deleting package-lock.json
The problem is with incompatible versions of node and npm between global instalation and your project angular version. To repair it, first you have to download and install nvm from here. Then you type
nvm install v8.11.3 and
nvm use v8.11.3.
After that you have to downgrade npm by typing
npm i npm#6.3.0 -g.
Now you can install node modules by typing
npm i
But this is not over :) You can't run the project by ng serve, because your node and npm version is mismatched with global #angular/cli version. So you have to revert to newest node by typing
nvm use 14.15.1 (if 14.15.1 is your version of node)
What about npm? It won't upgrade via npm i npm#latest -g, you have to use this workaround. After that you may have to install angular globally once again by typing
npm install -g #angular/cli#latest
and if you did that all and prayed enough, maybe it will work...

npm ERR! code ENOLOCAL while installing frontity

C:\WINDOWS\system32>npx frontity create my-app && cd my-app
npm ERR! code ENOLOCAL
npm ERR! Could not install from "wolf\AppData\Roaming\npm-cache_npx\4608" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Mystic wolf\AppData\Roaming\npm-cache_logs\2019-12-13T06_42_07_591Z-debug.log
Install for frontity#latest failed with code 1
i have tried clearing npm cache,
upgrading npm version
but cant solve it.
i feel like there is something is wrong with package.json
how to fix?
It seems like it is a problem of npx when the user folder contains an space (Mystic wolf)
You need to move the npm cache to a folder without spaces.
First, open cmd as Administrator.
Search for cmd
Right click
Choose “Run as Administrator”
Enter your password
run-as-administrator-screenshot
Then enter these commands in the console:
> mklink /J "C:\Users\mystic-wolf" "C:\Users\Mystic wolf"
> npm config set cache C:\Users\mystic-wolf\AppData\Roaming\npm-cache
> npm config set prefix C:\Users\mystic-wolf\AppData\Roaming\npm
> npm cache clean --force
You have more info here: https://community.frontity.org/t/error-running-npx/512/8.
Try using this command:
npm i #frontity/core
It Works.