Couldn't download a package using npm install because of a strange error - npm

When I try to install a package name react-native-map I got this error from npm:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: styled-components#5.3.6
npm ERR! Found: react#18.1.0
npm ERR! node_modules/react
npm ERR! react#"18.1.0" from the root project
npm ERR! peer react#">=16.3.0" from #callstack/react-theme-provider#3.0.8
npm ERR! node_modules/#callstack/react-theme-provider
npm ERR! #callstack/react-theme-provider#"^3.0.8" from react-native-paper#5.1.3
npm ERR! node_modules/react-native-paper
npm ERR! react-native-paper#"^5.1.3" from the root project
npm ERR! 16 more (#react-navigation/bottom-tabs, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-dom#">= 16.8.0" from styled-components#5.3.6
npm ERR! node_modules/styled-components
npm ERR! styled-components#"^5.3.6" from the root project
npm ERR! peer styled-components#">= 2" from babel-plugin-styled-components#2.0.7
npm ERR! node_modules/babel-plugin-styled-components
npm ERR! babel-plugin-styled-components#">= 1.12.0" from styled-components#5.3.6
npm ERR!
npm ERR! Conflicting peer dependency: react#18.2.0
npm ERR! node_modules/react
npm ERR! peer react#"^18.2.0" from react-dom#18.2.0
npm ERR! node_modules/react-dom
npm ERR! peer react-dom#">= 16.8.0" from styled-components#5.3.6
npm ERR! node_modules/styled-components
npm ERR! styled-components#"^5.3.6" from the root project
npm ERR! 1 more (babel-plugin-styled-components)
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\rubyh\AppData\Local\npm-cache\_logs\2023-01-29T03_02_03_303Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\rubyh\AppData\Local\npm-cache\_logs\2023-01-29T03_02_03_303Z-debug-0.log
my npm version: 9.4.0
react-native: 0.70.5
react: 18.1.0
this is just some random text to meet the requirement:
Mark Elliot Zuckerberg (/ˈzʌkərbɜːrɡ/; born May 14, 1984) is an American business magnate, internet entrepreneur, and philanthropist. He is known for co-founding the social media website Facebook and its parent company Meta Platforms (formerly Facebook, Inc.), of which he is the chairman, chief executive officer, and controlling shareholder.[1][2]
Zuckerberg attended Harvard University, where he launched Facebook in February 2004 with his roommates Eduardo Saverin, Andrew McCollum, Dustin Moskovitz, and Chris Hughes. Originally launched to select college campuses, the site expanded rapidly and eventually beyond colleges, reaching one billion users by 2012. Zuckerberg took the company public in May 2012 with majority shares. In 2007, at age 23, he became the world's youngest self-made billionaire. He has used his funds to organize multiple philanthropic endeavors, including the Chan Zuckerberg Initiative.

Related

How to use i18n-iso-countries in react-native?

I need to get the country names in different languages ( using localization )
I found this library i18n-iso-countries : https://www.npmjs.com/package/i18n-iso-countries
doing what I need , but when I tried to install it using npm install i18n-iso-countries I got these errors :
`npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: qoyod_mobile#1.5.4 npm ERR! Found: react-native#0.70.3 npm ERR! node_modules/react-native npm ERR! peer react-native#"*" from #intercom/intercom-react-native#3.0.5 npm ERR! node_modules/#intercom/intercom-react-native npm ERR! #intercom/intercom-react-native#"^3.0.5" from the root project npm ERR! peer react-native#"^0.0.0-0 || 0.60 - 0.70 || 1000.0.0" from #react-native-async-storage/async-storage#1.17.10 npm ERR! node_modules/#react-native-async-storage/async-storage npm ERR! #react-native-async-storage/async-storage#"^1.17.10" from the root project npm ERR! 36 more (#react-native-community/masked-view, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! dev react-native#"0.70.5" from the root project npm ERR! npm ERR! Conflicting peer dependency: react#18.1.0 npm ERR! node_modules/react npm ERR! peer react#"18.1.0" from react-native#0.70.5 npm ERR! node_modules/react-native npm ERR! dev react-native#"0.70.5" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or
--legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\username\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\username\AppData\Local\npm-cache\_logs\2022-12-04T13_04_11_830Z-debug-0.log`
How can I use this library in react-native , or is there and alternative library in react native that can give me the countries in different languages ?
From your error looks like you have a peer dependency conflict. This is an article on how to resolve it https://www.folkstalk.com/2022/09/fix-the-upstream-dependency-conflict-installing-npm-packages-with-code-examples.html

trying to understand peer dependency problems

if I run npm, it installs everything fine but it tells me I have 19 HIGH severe vulnerabilities.. it tells me to run npm audit fix
but if I do that, I get:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: angular-frontend#0.0.1
npm ERR! Found: rxjs#7.5.7
npm ERR! node_modules/rxjs
npm ERR! rxjs#"~7.5.0" from the root project
npm ERR! peer rxjs#"^6.5.3 || ^7.4.0" from #angular/core#14.2.8
npm ERR! node_modules/#angular/core
npm ERR! #angular/core#"^14.1.0" from the root project
npm ERR! peer #angular/core#">=6.0.0" from #storybook/angular#6.1.21
npm ERR! node_modules/#storybook/angular
npm ERR! dev #storybook/angular#"^6.1.21" from the root project
npm ERR! 7 more (#angular/compiler, #angular/service-worker, ...)
npm ERR! 3 more (#angular/common, ng-packagr, #angular/forms)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer rxjs#"^6.0.0" from #storybook/angular#6.1.21
npm ERR! node_modules/#storybook/angular
npm ERR! dev #storybook/angular#"^6.1.21" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
My first question is, why is this "not" a problem for installation? (it succeeds, my app builds and runs)...
My second question is, is there not a way to supply the version of rxjs that #storybook/angular#6.1.21 wants? Like, can I not have both rxjs 7.5.7 AND ^6.0.0 and just have ^6.0.0 available for storybook?

React Native deck swiper library not working

I am trying to install the react native deck swiper using npm and I am getting the following error. Guys is the something wrong with this library "npm install react-native-deck-swiper" and if there is how do we fix it?
npm WARN config global --global, --local are deprecated. Use --location=global instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-native-deck-swiper#2.0.8
npm ERR! Found: react-native#0.69.5
npm ERR! node_modules/react-native
npm ERR! peer react-native#"" from #react-native-community/cli#8.0.6
npm ERR! node_modules/#react-native-community/cli
npm ERR! #react-native-community/cli#"^8.0.4" from react-native#0.69.5
npm ERR! peer react-native#"" from #react-navigation/elements#1.3.5
npm ERR! node_modules/#react-navigation/elements
npm ERR! #react-navigation/elements#"^1.3.5" from #react-navigation/native-stack#6.8.0
npm ERR! node_modules/#react-navigation/native-stack
npm ERR! #react-navigation/native-stack#"^6.8.0" from the root project
npm ERR! 6 more (#react-navigation/native, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native#"^0.49.1" from react-native-deck-swiper#2.0.8
npm ERR! node_modules/react-native-deck-swiper
npm ERR! react-native-deck-swiper#"^2.0.8" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react-native#0.49.5
npm ERR! node_modules/react-native
npm ERR! peer react-native#"^0.49.1" from react-native-deck-swiper#2.0.8
npm ERR! node_modules/react-native-deck-swiper
npm ERR! react-native-deck-swiper#"^2.0.8" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Leago\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Leago\AppData\Local\npm-cache_logs\2022-08-31T23_17_27_722Z-debug-0.log
I had the same issue as you, I found out it's more related to the command npm, apparently it works with yarn.
You can check these two links in which the problem is treated, but I don't think forcing the installation with npm install --force is a good idea:
React-native-deck-swiper unable to install
https://github.com/alexbrillant/react-native-deck-swiper/issues/337

what should i do to fix this upstream dependency issue with sveltekit and netify-cms

I have installed sveltekit and deployed the sveltekit template to netify.
I want to link it to netify-cms and then do some actually website building but it caused this error when trying to download the npm package.
C:\Users\pjsup\code\ponders-showcase>npm i netlify-cms-app
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! peer react#"^16.8.4 || ^17.0.0" from netlify-cms-app#2.15.40
npm ERR! node_modules/netlify-cms-app
npm ERR! netlify-cms-app#"*" from the root project
npm ERR! peer react#"17.0.2" from react-dom#17.0.2
npm ERR! node_modules/react-dom
npm ERR! peer react-dom#"^16.8.4 || ^17.0.0" from netlify-cms-app#2.15.40
npm ERR! node_modules/netlify-cms-app
npm ERR! netlify-cms-app#"*" from the root project
npm ERR! peer react-dom#"^16.8.4 || ^17.0.0" from netlify-cms-core#2.48.0
npm ERR! node_modules/netlify-cms-core
npm ERR! netlify-cms-core#"^2.48.0" from netlify-cms-app#2.15.40
npm ERR! node_modules/netlify-cms-app
npm ERR! netlify-cms-app#"*" from the root project
npm ERR! 7 more (netlify-cms-widget-date, ...)
npm ERR! 39 more (#emotion/core, #emotion/styled, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.0.0-0" from react-split-pane#0.1.92
npm ERR! node_modules/netlify-cms-core/node_modules/react-split-pane
npm ERR! react-split-pane#"^0.1.85" from netlify-cms-core#2.48.0
npm ERR! node_modules/netlify-cms-core
npm ERR! netlify-cms-core#"^2.48.0" from netlify-cms-app#2.15.40
npm ERR! node_modules/netlify-cms-app
npm ERR! netlify-cms-app#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\pjsup\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\pjsup\AppData\Local\npm-cache\_logs\2021-09-06T12_26_54_989Z-debug.log
Is this because the netify-cms cannot work with sveltekit yet? It claims to work with Sapper its predecessor.
https://www.netlifycms.org/docs/add-to-your-site/

error on install native-base in my project

npm install native-base
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: react#16.13.1
npm ERR! node_modules/react
npm ERR! peer react#"^16.13.1" from react-dom#16.13.1
npm ERR! node_modules/react-dom
npm ERR! peer react-dom#">=16.5.1" from react-native-web#0.13.18
npm ERR! node_modules/react-native-web
npm ERR! react-native-web#"~0.13.12" from the root project
npm ERR! react-dom#"16.13.1" from the root project
npm ERR! peer react#"16.13.1" from react-native#0.63.2
npm ERR! node_modules/react-native
npm ERR! peer react-native#">=0.62.0-rc.0 <0.64.0" from #react-native-community/cli#4.14.0
npm ERR! node_modules/#react-native-community/cli
npm ERR! #react-native-community/cli#"^4.14.0" from react-native#0.63.2
npm ERR! peer react-native#"*" from react-native-safe-area-context#3.2.0
npm ERR! node_modules/react-native-safe-area-context
npm ERR! react-native-safe-area-context#"3.2.0" from expo#41.0.1
npm ERR! node_modules/expo
npm ERR! expo#"~41.0.1" from the root project
npm ERR! 3 more (the root project, native-base, #codler/react-native-keyboard-aware-scroll-view)
npm ERR! 5 more (react-native-safe-area-context, react-native-web, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"17.0.1" from react-native-windows#0.64.4
npm ERR! node_modules/native-base/node_modules/react-native-windows
npm ERR! peer react-native-windows#">=0.62" from #react-native-community/datetimepicker#3.4.7
npm ERR! node_modules/native-base/node_modules/#react-native-community/datetimepicker
npm ERR! #react-native-community/datetimepicker#"^3.0.2" from native-base#2.15.2
npm ERR! node_modules/native-base
npm ERR! native-base#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/idanknafo/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/idanknafo/.npm/_logs/2021-04-26T15_35_25_621Z-debug.log
Hello everyone I am trying to install the native-base directory and I get this error anyone know how to fix this? Thanks in advance!
If that helps i am working on macbook pro m1
This command may solve your problem:
npm install native-base --force
or
npm install native-base --legacy-peer-deps
I faced this problem today, so I used yarn add native-base instead of npm.