I am new to react-native.
After I changed "rn-nodeify":"10.3.0"
to package.json
under devDependencies
and run npm install
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.
> [email protected] 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 ?
CodePudding user response:
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
CodePudding user response:
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