React-native not able to uninstall react-native-maps - react-native-maps

Receiving following error when try to uninstall
$ npm uninstall --save react-native-maps/
npm WARN react-dom#15.5.4 requires a peer of react#^15.5.4 but none was installed.
npm WARN react-native#0.44.0 requires a peer of react#16.0.0-alpha.6 but none was installed.
npm WARN react-native-elements#0.9.7 requires a peer of react-native-vector-icons#~4.0.0 but none was installed.
npm WARN react-native-maps#0.13.0 requires a peer of react#>=15.4.0 but none was installed.
npm WARN react-native#0.41.2 requires a peer of react#~15.4.0 but none was installed.
npm WARN react-native-windows#0.41.0-rc.0 requires a peer of react-native#~0.41.0 but none was installed.
npm WARN react-native-windows#0.41.0-rc.0 requires a peer of react#~15.4.0 but none was installed.
npm WARN react-static-container#1.0.1 requires a peer of react#^0.13.0 || ^0.14.0 || ^15.0.0 but none was installed.
npm WARN react-test-renderer#15.4.2 requires a peer of react#^15.4.2 but none was installed.
Can someone tell, how to resolve these warnings and uninstall react-native-maps?

Make sure you have react and react-native modules installed. The message format WARN react-dom#15.5.4 requires a peer of react#^15.5.4 but none was installed. tells you that react-dom needs react but react is not present.
You also need to make sure you install the proper version of react and react-native.

Try to use
react-native unlink react-native-maps && yarn remove react-native-maps.It will remove all the related packages in android & ios folder also.

Related

problem during npm install of a react-native project

I have a problem while running the npm install command. Some packages are not in the correct version and I don't know how to fix this problem.
The project is in react-native and I use android studio and the version of npm is v6.14.11 and node is v14.15.4.
Applying patches...
No patch files found
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules\jest-haste-map\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN #react-native-community/cameraroll#1.0.3 requires a peer of react-native#>=0.57 <0.59 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-country-picker-modal#1.11.0 requires a peer of react-dom#* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-country-picker-modal#1.11.0 requires a peer of react-native-web#* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-fs#2.16.6 requires a peer of react-native#^0.59.5 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-fs#2.16.6 requires a peer of react-native-windows#^0.57.2 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-loader#1.3.1 requires a peer of #react-native-community/art#^1.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-pulse-loader#1.0.3 requires a peer of react-native#^0.27 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-pulse-loader#1.0.3 requires a peer of prop-types#15.6.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-sound-recorder#1.5.0 requires a peer of react-native#^0.46.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-vector-icons#6.7.0 requires a peer of #react-native-community/toolbar-android#^0.1.0-rc.1 but none is installed. You must install peer dependencies yourself.
npm WARN #sentry/react#5.29.2 requires a peer of react-dom#15.x || 16.x || 17.x but none is installed. You must install peer dependencies yourself.
npm WARN #codler/react-native-keyboard-aware-scroll-view#1.0.1 requires a peer of react-native#>=0.63.0 but none is installed. You must install peer dependencies yourself.
npm WARN #react-native-community/datetimepicker#3.0.9 requires a peer of react-native-windows#>=0.62 but none is installed. You must install peer dependencies yourself.
npm WARN modal-react-native-web#0.2.0 requires a peer of react-art#16.x.x but none is installed. You must install peer dependencies yourself.
npm WARN modal-react-native-web#0.2.0 requires a peer of react-dom#16.x.x but none is installed. You must install peer dependencies yourself.
npm WARN modal-react-native-web#0.2.0 requires a peer of react-native-web#0.9.x but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/parser#1.13.0 requires a peer of eslint#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/eslint-plugin#1.13.0 requires a peer of eslint#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react#7.12.4 requires a peer of eslint#^3.0.0 || ^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react-native#3.6.0 requires a peer of eslint#^3.17.0 || ^4 || ^5 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils#3.19.0 requires a peer of typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
added 1506 packages from 942 contributors and audited 1513 packages in 229.863s
51 packages are looking for funding
run `npm fund` for details
found 5 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
These are warnings, if you see the final message says that the packages was added successfully :)

How can I manually link react-native-camera in Android Studio?

Just to clarify, I'm running a Windows computer using Android Studio.
I'm trying to set up a QR code scanner using react-native-camera in a react native application.
I can install the library without a problem:
$ npm install react-native-camera --save
gives
npm WARN babel-eslint#10.0.1 requires a peer of eslint#>= 4.12.1 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-eslint-comments#3.1.2 requires a peer of eslint#>=4.19.1 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-flowtype#2.50.3 requires a peer of eslint#>=2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-jest#22.4.1 requires a peer of eslint#>=5 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react#7.12.4 requires a peer of eslint#^3.0.0 || ^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react-hooks#1.6.1 requires a peer of eslint#^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react-native#3.6.0 requires a peer of eslint#^3.17.0 || ^4 || ^5 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename '[file location]\node_modules\.staging\fsevents-7a20bca6\node_modules\needle' -> '[file location]\node_modules\.staging\needle-41ea96cc'
+ react-native-camera#3.8.0
updated 1 package and audited 948127 packages in 76.202s
found 0 vulnerabilities
Every online reference I have have seen, such as https://facebook.github.io/react-native/docs/linking-libraries-ios
only seem to give instructions if you are programming for iOS on a Mac.
Documents for the library at https://react-native-community.github.io/react-native-camera/docs/installation recommends autolinking using
$ react-native link react-native-camera.
I get:
info Linking "react-native-camera" iOS dependency
info iOS module "react-native-camera" has been successfully linked
info Linking "react-native-camera" Android dependency
info Android module "react-native-camera" has been successfully linked
The problem arises when building it on my device, using $ react-native run-android, where I get:
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
- react-native-camera (to unlink run: "react-native unlink react-native-camera")
This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink <dependency>" and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers.
Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
The only results for manual linking is on XCode, but can anyone help me with Android Studio? I would really appreciate it.
It looks like you are using new version of react-native (0.60 or higher). In this case, you don't have to link your library yourself, as libraries that support latest react-native now link themselves upon installation.
You should be able to do npm install react-native-camera --save and have it working. In case you used react-native link react-native-camera before, you may now need to run react-native unlink react-native-camera to revert what was done by link command. You might also need to reinstall the library (npm uninstall react-native-camera followed by npm install react-native-camera --save). If it still doesn't work you can go through manual installation of this library

Expo says react-native is missing

I installed expo using the facebook guide by running
npm install -g expo-cli
npm install react-navigation
expo start
However it still says
npm WARN #react-native-community/netinfo#2.0.10 requires a peer of react-native#>=0.57 <0.60 but none is installed. You must install peer dependencies yourself.
npm WARN react-google-maps#9.4.5 requires a peer of #types/googlemaps#^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-google-maps#9.4.5 requires a peer of #types/markerclustererplus#^2.1.29 but none is installed. You must install peer dependencies yourself.
npm WARN react-google-maps#9.4.5 requires a peer of #types/react#^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-reanimated#1.0.1 requires a peer of react#16.0.0-alpha.6 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-reanimated#1.0.1 requires a peer of react-native#^0.44.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-webview#5.8.1 requires a peer of react-native#>=0.57 <0.60 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
I tried to delete my node_modules folder and rerunning npm install in the directory of my project
It still says react-native not found, although running
react-native -v
in command line, shows
react-native-cli: 2.0.1
react-native: 0.60.3
Actually you have only install expo-cli not react native cli , even if your package.json has react-native it is not accessiable from your cli . so you have to install react-native-cli seperately so that you can access react-native.
npm install –g react-native-cli

I accidentally typo'd "npm i npm" and it installed a bunch of node modules I didn't need. How can I revert?

I'm new, and I'm lost because I think I messed up my whole program. I cannot install anymore node variations. I'm using Visual Studio Code. And after the code below I typed "npm uninstall npm" thinking it would fix it, but it seems not.
I tried npm uninstall npm and it didn't work. :/
npm WARN discord.js#11.5.0 requires a peer of bufferutil#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.5.0 requires a peer of erlpack#discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.5.0 requires a peer of libsodium-wrappers#^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.5.0 requires a peer of node-opus#^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.5.0 requires a peer of opusscript#^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.5.0 requires a peer of sodium#^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.5.0 requires a peer of #discordjs/uws#^10.149.0 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js-commando#0.10.0 requires a peer of sqlite#^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN westeros-bot#1.0.0 No description
npm WARN westeros-bot#1.0.0 No repository field.
+ npm#6.9.0
added 426 packages from 800 contributors and audited 12108 packages in 45.684s
found 12 high severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details```
AFTER
```c:\Users\madel\Desktop\Westeros Bot\dist>npm uninstall npm
npm WARN discord.js#11.5.0 requires a peer of bufferutil#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.5.0 requires a peer of erlpack#discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.5.0 requires a peer of libsodium-wrappers#^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.5.0 requires a peer of node-opus#^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.5.0 requires a peer of opusscript#^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.5.0 requires a peer of sodium#^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.5.0 requires a peer of #discordjs/uws#^10.149.0 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js-commando#0.10.0 requires a peer of sqlite#^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN westeros-bot#1.0.0 No description
npm WARN westeros-bot#1.0.0 No repository field.
removed 426 packages and audited 12 packages in 7.294s
found 0 vulnerabilities```
You can try npm remove npm and run npm install to update package-lock.json file.

AXIOS installation issue

I am starting with a tutorial to learn react native. I am trying to install axios using npm but when i do i get the following message. (I am midway through and everything has been going fine until now)
Thanks for your help.
npm WARN #babel/plugin-transform-exponentiation-operator#7.0.0-beta.46 requires a peer of #babel/core#7.0.0-beta.46 but none was installed.
npm WARN #babel/register#7.0.0-beta.46 requires a peer of #babel/core#7.0.0-beta.46 but none was installed.
npm WARN eslint-plugin-react-native#3.2.1 requires a peer of eslint#^3.17.0 || ^4.0.0 but none was installed.
npm WARN react-native-maps#0.21.0 requires a peer of react-native#^0.51 || ^0.52 || ^0.53 || ^0.54 but none was installed.