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

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.

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 :)

npm audit fix --force

I wanted to get rid of my vurnerabilities and used
npm audit fix --force
But i canceled it after a few lines, because it said: "I hope you know what you are doing"
Now if i try
npm install
i get
$ npm install
npm WARN #angular-devkit/build-angular#0.900.7 requires a peer of typescript#>=3.6 < 3.8 but none is installed. You must install peer dependencies yourself.
npm WARN #ngtools/webpack#9.0.7 requires a peer of typescript#>=3.6 < 3.8 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/compiler-cli#9.0.7 requires a peer of typescript#>=3.6 <3.8 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/platform-browser-dynamic#8.1.3 requires a peer of #angular/compiler#8.1.3 but none is installed. You must install peer dependencies yourself.
npm WARN #ngtools/webpack#9.0.7 requires a peer of typescript#>=3.6 < 3.8 but none is installed. You must install peer dependencies yourself.
npm WARN ts-jest#24.0.2 requires a peer of jest#>=24 <25 but none is installed. You must install peer dependencies yourself.
audited 1219421 packages in 12.454s
39 packages are looking for funding
run `npm fund` for details
found 23 vulnerabilities (21 low, 2 moderate)
run `npm audit fix` to fix them, or `npm audit` for details
If I install #angular/compiler#8.1.3 i need #angular/compiler#9.0.7 and vise versa
I had the same problem i resolved it by running the command "ng update", this command will provide you with packages need to be updated and the commands to update it.Hope this will help you.

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

Error while installing things from npm

**npm WARN** codelyzer#3.2.2 requires a peer of #angular/compiler#^2.3.1 || >=4.0.0-beta <5.0.0 but none is installed. You must install peer dependencies yourself.
**npm WARN** codelyzer#3.2.2 requires a peer of #angular/core#^2.3.1 || >=4.0.0-beta <5.0.0 but none is installed. You must install peer dependencies yourself.
**npm WARN** #angular/router#3.2.4 requires a peer of #angular/core#2.2.4 but none is installed. You must install peer dependencies yourself.
**npm WARN** #angular/router#3.2.4 requires a peer of #angular/common#2.2.4 but none is installed. You must install peer dependencies yourself.
**npm WARN** #angular/router#3.2.4 requires a peer of #angular/platform-browser#2.2.4 but none is installed. You must install peer dependencies yourself.
**npm WARN** #angular/router#3.2.4 requires a peer of rxjs#5.0.0-beta.12 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/compiler#2.2.4 requires a peer of #angular/core#2.2.4 but none is installed. You must install peer dependencies yourself.
**npm WARN** #angular/compiler-cli#2.3.0 requires a peer of #angular/compiler#2.3.0 but none is installed. You must install peer dependencies yourself.
**npm WARN** #angular/platform-browser-dynamic#2.3.0 requires a peer of #angular/compiler#2.3. but none is installed. You must install peer dependencies yourself.
**npm WARN** optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules/fsevents):
**npm WARN** notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"ia32"})
It says that You should have installed #angular/compiler version between 2.3.1 and 4.0.0. same about angular/core module and others. Check out your package.json file, it has the list of all module installed with its version. If you haven't installed all modules then run npm install in terminal.You can use latest version by using npm install -g #angular/cli#latest. (You can use any version by writing #(version-number) like #2.5.5 ) in the end. Maybe this post is helpful

React-native not able to uninstall 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.