Home > Blockchain >  npm install didn't update the dependencies
npm install didn't update the dependencies

Time:03-10

I run npm install to update dependencies in package.json of my react-native cli app but this did not work for me I also run npm aduit fix or npm audit fix --force

I also try to remove the node_modules folder and run the npm install but same old dependencies again

I check the upto date dependensies to run npm outdated the result is this

@invertase/react-native-apple-authentication    1.1.2    1.1.2    2.1.5  node_modules/@invertase/react-native-apple-authentication  ReactNativeMultiVendor
@react-native-community/checkbox                0.5.2   0.5.12   0.5.12  node_modules/@react-native-community/checkbox              ReactNativeMultiVendor
@react-native-firebase/app                     10.8.1   10.8.1   14.5.1  node_modules/@react-native-firebase/app                    ReactNativeMultiVendor
@react-native-firebase/auth                    10.8.1   10.8.1   14.5.1  node_modules/@react-native-firebase/auth                   ReactNativeMultiVendor
@react-native-firebase/messaging               10.8.1   10.8.1   14.5.1  node_modules/@react-native-firebase/messaging              ReactNativeMultiVendor
@react-navigation/bottom-tabs                 5.11.15  5.11.15    6.2.0  node_modules/@react-navigation/bottom-tabs                 ReactNativeMultiVendor
@react-navigation/drawer                       5.12.9   5.12.9    6.3.1  node_modules/@react-navigation/drawer                      ReactNativeMultiVendor
@react-navigation/native                        5.9.8    5.9.8    6.0.8  node_modules/@react-navigation/native                      ReactNativeMultiVendor
@react-navigation/stack                        5.14.9   5.14.9    6.1.1  node_modules/@react-navigation/stack                       ReactNativeMultiVendor
babel-jest                                     25.5.1   25.5.1   27.5.1  node_modules/babel-jest                                    ReactNativeMultiVendor
babel-preset-react-native                       2.1.0    2.1.0    4.0.1  node_modules/babel-preset-react-native                     ReactNativeMultiVendor
base-64                                         0.1.0    0.1.0    1.0.0  node_modules/base-64                                       ReactNativeMultiVendor
crypto-js                                       3.3.0    3.3.0    4.1.1  node_modules/crypto-js                                     ReactNativeMultiVendor
eslint-config-prettier                          4.3.0    4.3.0    8.5.0  node_modules/eslint-config-prettier                        ReactNativeMultiVendor
eslint-plugin-prettier                          3.4.1    3.4.1    4.0.0  node_modules/eslint-plugin-prettier                        ReactNativeMultiVendor
expo-av                                         8.7.0    8.7.0   10.2.1  node_modules/expo-av                                       ReactNativeMultiVendor
expo-blur                                       8.2.2    8.2.2   11.0.0  node_modules/expo-blur                                     ReactNativeMultiVendor
expo-facebook                                   8.2.1    8.2.1   12.1.1  node_modules/expo-facebook                                 ReactNativeMultiVendor
expo-file-system                                9.3.0    9.3.0   13.1.4  node_modules/expo-file-system                              ReactNativeMultiVendor
expo-firebase-recaptcha                         1.4.4    1.4.4    2.1.0  node_modules/expo-firebase-recaptcha                       ReactNativeMultiVendor
expo-image-picker                               8.4.0    8.4.0   12.0.2  node_modules/expo-image-picker                             ReactNativeMultiVendor
expo-localization                               8.2.1    8.2.1   12.0.1  node_modules/expo-localization                             ReactNativeMultiVendor
expo-location                                   8.3.0    8.3.0   14.0.2  node_modules/expo-location                                 ReactNativeMultiVendor
expo-permissions                                9.1.0    9.1.0   13.1.1  node_modules/expo-permissions                              ReactNativeMultiVendor
firebase                                       8.10.1   8.10.1    9.6.8  node_modules/firebase                                      ReactNativeMultiVendor
metro-react-native-babel-preset                0.59.0   0.59.0   0.69.0  node_modules/metro-react-native-babel-preset               ReactNativeMultiVendor
react                                         16.13.1  16.13.1   17.0.2  node_modules/react                                         ReactNativeMultiVendor
react-native                                   0.61.4   0.61.5   0.67.3  node_modules/react-native                                  ReactNativeMultiVendor
react-native-appearance                         0.0.0    0.0.0    0.3.4  node_modules/react-native-appearance                       ReactNativeMultiVendor
react-native-confirmation-code-field            6.7.0    6.7.0    7.3.0  node_modules/react-native-confirmation-code-field          ReactNativeMultiVendor
react-native-device-info                        5.6.5    5.6.5    8.5.0  node_modules/react-native-device-info                      ReactNativeMultiVendor
react-native-elements                           2.3.2    2.3.2    3.4.2  node_modules/react-native-elements                         ReactNativeMultiVendor
react-native-fbsdk                              1.1.2    1.1.2    3.0.0  node_modules/react-native-fbsdk                            ReactNativeMultiVendor
react-native-geocoding                          0.4.0    0.4.0    0.5.0  node_modules/react-native-geocoding                        ReactNativeMultiVendor
react-native-gesture-handler                   1.10.3   1.10.3    2.3.1  node_modules/react-native-gesture-handler                  ReactNativeMultiVendor
react-native-iap                                7.5.6    7.5.6    8.0.5  node_modules/react-native-iap                              ReactNativeMultiVendor
react-native-image-crop-picker                 0.33.4   0.33.4   0.37.3  node_modules/react-native-image-crop-picker                ReactNativeMultiVendor
react-native-localize                           1.4.3    1.4.3    2.2.0  node_modules/react-native-localize                         ReactNativeMultiVendor
react-native-maps                              0.27.1   0.27.1   0.30.1  node_modules/react-native-maps                             ReactNativeMultiVendor
react-native-modal                            11.10.0  11.10.0   13.0.1  node_modules/react-native-modal                            ReactNativeMultiVendor
react-native-phone-input                        0.2.4    0.2.4    1.3.2  node_modules/react-native-phone-input                      ReactNativeMultiVendor
react-native-progress                           4.1.2    4.1.2    5.0.0  node_modules/react-native-progress                         ReactNativeMultiVendor
react-native-ratings                            7.6.1    7.6.1    8.1.0  node_modules/react-native-ratings                          ReactNativeMultiVendor
react-native-safe-area-context                  3.4.1    3.4.1    4.1.2  node_modules/react-native-safe-area-context                ReactNativeMultiVendor
react-native-screens                           2.18.1   2.18.1   3.13.1  node_modules/react-native-screens                          ReactNativeMultiVendor
react-native-search-box                        0.0.19   0.0.19   0.0.20  node_modules/react-native-search-box                       ReactNativeMultiVendor
react-native-snap-carousel                      1.3.1    1.6.1    3.9.1  node_modules/react-native-snap-carousel                    ReactNativeMultiVendor
react-native-ui-lib                             5.4.2   5.30.2   6.11.0  node_modules/react-native-ui-lib                           ReactNativeMultiVendor
react-native-vector-icons                       7.0.0    7.0.0    9.1.0  node_modules/react-native-vector-icons                     ReactNativeMultiVendor
react-test-renderer                           16.13.1  16.13.1   17.0.2  node_modules/react-test-renderer                           ReactNativeMultiVendor
remote-redux-devtools                          0.5.14   0.5.16   0.5.16  node_modules/remote-redux-devtools                         ReactNativeMultiVendor
uuidv4                                          5.0.1    5.0.1   6.2.12  node_modules/uuidv4                                        ReactNativeMultiVendor
yup                                            0.28.5   0.28.5  0.32.11  node_modules/yup                                           ReactNativeMultiVendor

for updating the dependencies I run npm update and I see these errors

npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"16.13.1" from the root project
npm ERR!   peer react@"*" from @react-native-community/[email protected]
npm ERR!   node_modules/@react-native-community/art
npm ERR!     @react-native-community/art@"^1.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"16.9.0" from [email protected]
npm ERR! node_modules/react-native
npm ERR!   react-native@"^0.61.4" from the root project
npm ERR!   peer react-native@"*" from @react-native-community/[email protected]
npm ERR!   node_modules/@react-native-community/art
npm ERR!     @react-native-community/art@"^1.2.0" 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\Dell\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\Dell\AppData\Local\npm-cache\_logs\2022-03-10T09_44_11_332Z-debug-0.log

I try to run npm update -force it shows me many warnings and error here you cans see that

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @react-native-community/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react-native
npm WARN   react-native@"^0.61.4" from the root project
npm WARN   49 more (@react-native-community/art, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-native@">= 0.62" from @react-native-community/[email protected]
npm WARN node_modules/@react-native-community/checkbox
npm WARN   @react-native-community/checkbox@"^0.5.2" from the root project
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react-native
npm WARN   peer react-native@">= 0.62" from @react-native-community/[email protected]
npm WARN   node_modules/@react-native-community/checkbox
npm WARN     @react-native-community/checkbox@"^0.5.2" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"16.11.0" from [email protected]
npm WARN   node_modules/@react-native-community/datetimepicker/node_modules/react-native-windows
npm WARN     optional react-native-windows@"^0.62.0-0" from @react-native-community/[email protected]
npm WARN     node_modules/@react-native-community/datetimepicker
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"16.9.0" from [email protected]
npm WARN node_modules/react-native
npm WARN   react-native@"^0.61.4" from the root project
npm WARN   49 more (@react-native-community/art, ...)
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"16.9.0" from [email protected]
npm WARN   node_modules/react-native
npm WARN     react-native@"^0.61.4" from the root project
npm WARN     49 more (@react-native-community/art, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react-native
npm WARN   react-native@"^0.61.4" from the root project
npm WARN   49 more (@react-native-community/art, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-native@"^0.50.0" from [email protected]
npm WARN node_modules/react-native-loader-overlay
npm WARN   react-native-loader-overlay@"^1.0.0" from the root project
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react-native
npm WARN   peer react-native@"^0.50.0" from [email protected]
npm WARN   node_modules/react-native-loader-overlay
npm WARN     react-native-loader-overlay@"^1.0.0" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react-native
npm WARN   react-native@"^0.61.4" from the root project
npm WARN   49 more (@react-native-community/art, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-native@"^0.60.0" from [email protected]
npm WARN node_modules/react-native-modal-patch
npm WARN   react-native-modal-patch@"https://github.com/HarvestProfit/react-native-modal-patch.git" from the root project
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react-native
npm WARN   peer react-native@"^0.60.0" from [email protected]
npm WARN   node_modules/react-native-modal-patch
npm WARN     react-native-modal-patch@"https://github.com/HarvestProfit/react-native-modal-patch.git" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"16.11.0" from [email protected]
npm WARN   node_modules/@react-native-community/datetimepicker/node_modules/react-native-windows
npm WARN     optional react-native-windows@"^0.62.0-0" from @react-native-community/[email protected]
npm WARN     node_modules/@react-native-community/datetimepicker
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@">=17.0.1" from [email protected]
npm WARN node_modules/react-native-ui-lib
npm WARN   react-native-ui-lib@"^5.4.2" from the root project
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@">=17.0.1" from [email protected]
npm WARN   node_modules/react-native-ui-lib
npm WARN     react-native-ui-lib@"^5.4.2" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react-native
npm WARN   react-native@"^0.61.4" from the root project
npm WARN   49 more (@react-native-community/art, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-native@">=0.64.1" from [email protected]
npm WARN node_modules/react-native-ui-lib
npm WARN   react-native-ui-lib@"^5.4.2" from the root project
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react-native
npm WARN   peer react-native@">=0.64.1" from [email protected]
npm WARN   node_modules/react-native-ui-lib
npm WARN     react-native-ui-lib@"^5.4.2" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated [email protected]: Package moved to @redux-devtools/app.
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated [email protected]: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.

added 189 packages, removed 173 packages, changed 52 packages, and audited 2252 packages in 3m

105 packages are looking for funding
  run `npm fund` for details

39 vulnerabilities (4 low, 29 moderate, 6 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

After recieving these messages I run the npm audit fix or npm audit fix --force but nothing changed it shows me same errors that you have see above

Please correct me If I follow the wrong method I want to update all the dependencies to it's latest version

CodePudding user response:

Try installing npm-check-updates globally (https://www.npmjs.com/package/npm-check-updates). after installing this module you can run ncu -u to update version in package.json then with npm install updated version will be installed.

CodePudding user response:

after npm install also use npm update to upgrade the dependencies to the higher stable version. Then if you want you can use npm aduit fix.

  • Related