How to overcome ERESOLVE errors within EAS build for native-base and Expo? - react-native

I have got the following package.json file. Main purpose is to use Expo 44 with native-base (version ^3.0.0). I could not figure out why such an obvious combination does not work. (Could not find online for native-base, which Expo versions are recommended either.)
package.json:
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject",
"test": "node ./node_modules/jest/bin/jest.js --watchAll"
},
"dependencies": {
"#expo/samples": "2.1.1",
"#expo/vector-icons": "^12.0.0",
"#react-native-async-storage/async-storage": "~1.15.0",
"#react-native-community/datetimepicker": "4.0.0",
"#react-native-community/netinfo": "7.1.3",
"#react-native-picker/picker": "2.2.1",
"expo": "^44.0.0",
"expo-ads-admob": "~12.0.0",
"expo-app-loading": "~1.3.0",
"expo-apple-authentication": "~4.1.0",
"expo-application": "~4.0.1",
"expo-asset": "~8.4.5",
"expo-auth-session": "~3.5.0",
"expo-av": "~10.2.0",
"expo-facebook": "~12.1.0",
"expo-font": "~10.0.4",
"expo-haptics": "~11.1.0",
"expo-image-manipulator": "~10.2.0",
"expo-random": "~12.1.1",
"expo-screen-orientation": "~4.1.1",
"expo-sharing": "~10.1.0",
"expo-tracking-transparency": "~2.1.0",
"moment": "^2.24.0",
"native-base": "^3.0.0",
"react": "17.0.1",
"react-native": "0.64.3",
"react-native-gesture-handler": "~2.1.0",
"react-native-modal-datetime-picker": "^8.6.0",
"react-native-picker-select": "^8.0.0",
"react-native-progress": "^4.1.2",
"react-native-progress-circle": "^2.1.0",
"react-native-safe-area-context": "3.3.2",
"react-native-svg": "12.1.1",
"react-native-view-shot": "3.1.2",
"react-native-webview": "11.15.0",
"react-redux": "^6.0.0",
"redux": "^4.0.1"
},
"devDependencies": {
"babel-preset-expo": "9.0.1"
},
"resolutions": {},
"private": true
}
Even though all the local debugging and simulator runs work without problem, when the EAS try to build, following errors (coming from npm) are seen.
[stderr] npm ERR! code ERESOLVE
[stderr] npm
[stderr] ERR! ERESOLVE unable to resolve dependency tree
[stderr] npm ERR!
[stderr] npm ERR! While resolving: undefined#undefined
[stderr] npm ERR! Found: react#17.0.1
[stderr] npm ERR! node_modules/react
[stderr] npm ERR!
[stderr] react#"17.0.1" from the root project
[stderr] npm ERR! peer react#"*" from native-base#3.3.6
[stderr] npm ERR! node_modules/native-base
[stderr] npm ERR! native-base#"^3.0.0" from the root project
[stderr] npm ERR!
[stderr] npm ERR! Could not resolve dependency:
[stderr] npm ERR! peer react#"17.0.2" from react-dom#17.0.2
[stderr] npm ERR! node_modules/react-dom
[stderr] npm ERR! peer react-dom#"*" from native-base#3.3.6
[stderr] npm ERR! node_modules/native-base
[stderr] npm ERR! native-base#"^3.0.0" from the root project
[stderr] npm ERR!
[stderr] npm ERR! Fix the upstream dependency conflict, or retry
[stderr] npm ERR! this command with --force, or --legacy-peer-deps
[stderr] npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
[stderr] npm ERR!
[stderr] npm ERR! See /Users/expo/.npm/eresolve-report.txt for a full report.
[stderr]
[stderr] npm ERR! A complete log of this run can be found in:
[stderr] npm ERR! /Users/expo/.npm/_logs/2022-02-14T09_22_49_729Z-debug.log
npm exited with non-zero code: 1
How to overcome this problem, any ideas?
Chronology:
native-base was added into the project back in 2019, with "^2.10.0" version.
When upgrading to "expo": "^44.0.0" it required the native-base to be upgraded also, around 2021-12.
At 2021-12, native-base is upgraded to "native-base": "^3.0.0"
It was working up until recently, including EAS builds.
Just recently, after 2022-02-12, for some other purposes we updated our code, nuked the node_modules and we were republishing via EAS build and submit. But even though the "native-base": "^3.0.0" entry in the package.json did not change, the npm step in the EAS servers started to fail.
Other Info:
which build of the expo is failing android or ios.
ios
commands you are using to build.
eas build --platform ios --non-interactive
which package manager are you in this project ? yarn or npm.
I use yarn but eas build seems using npm
any other things which will be useful to replicate this error.
Unfortunately I don't have any other clue.

I also had similar problem.
I solved it by adding a line in package.json file.
"scripts": {
"eas-build-pre-install": "npm install --save --legacy-peer-deps"
}

It seems native-base searches "react-dom": "*" and could not find it so somehow uses "react-dom": "17.0.2" and it in turn looks for "react": "17.0.2" which conflicts with expo's "react": "17.0.1".
So adding "react-dom": "17.0.1" as dependency solved the problem. By this way "react-dom": "*" finds "react-dom": "17.0.1" which is dependent to Expo's version "react": "17.0.1". (Please let me know if this conclusion is wrong.)
Following are the ones related with native-base and these versions should be used otherwise the npm install fails for Expo 44:
"react-dom": "17.0.1",
"react-native-safe-area-context": "3.1.9",
"react-native-svg": "12.1.0",
Reference: https://github.com/GeekyAnts/NativeBase/issues/4647

As a temporary solution, you can add .npmrc file in your project directory with legacy-peer-deps=true and commit it. But at the end, you have to fix your dependencies.

Related

Can't execute npm install

When I am executing npm install this error shows. Any advice about this?
PS C:\Users\alex\Downloads\team> npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: frontend#0.0.0
npm ERR! Found: #angular/compiler#13.1.3
npm ERR! node_modules/#angular/compiler
npm ERR! #angular/compiler#"~13.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/compiler#"13.0.3" from #angular/compiler-cli#13.0.3
npm ERR! node_modules/#angular/compiler-cli
npm ERR! dev #angular/compiler-cli#"~13.0.0" from the root project
npm ERR! peer #angular/compiler-cli#"^13.0.0" from #angular-devkit/build-angular#13.2.2
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"^13.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! See C:\Users\ for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\
Here is Package.json file:
{
"name": "frontend",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"#angular-devkit/build-angular": "^13.1.0",
"#angular/cdk": "^13.1.0",
"#angular/common": "~13.1.0",
"#angular/compiler": "~13.1.0",
"#angular/core": "~13.1.0",
"#angular/forms": "~13.1.0",
"#angular/platform-browser": "~13.1.0",
"#angular/platform-browser-dynamic": "~13.1.0",
"#angular/router": "~13.1.0",
"#types/jquery": "^3.5.13",
"bootstrap": "^5.1.3",
"bootstrap4-toggle": "^3.6.1",
"colors": "^1.4.0",
"jquery": "^3.6.0",
"rxjs": "~7.4.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"#angular-devkit/build-angular": "^13.2.0",
"#angular/cli": "~13.0.4",
"#angular/compiler-cli": "~13.0.0",
"#types/jasmine": "~3.10.0",
"#types/node": "^12.11.1",
"jasmine-core": "~3.10.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.4.3"
}
}
ERESOLVE issues with npm#7 and npm#8 are common because they are more strict about peer dependencies than npm#6. Often, the easiest resolution is to pass the --legacy-peer-deps flag to npm (e.g., npm i --legacy-peer-deps) or else use npm#6.
The "correct" solution is to figure out which of your dependencies need to be updated in package.json to avoid the peer dependency conflict, but that is sometimes not possible with dependencies that are unmaintained. In that case, the solution is to find or create something else to get rid of the unmaintained dependency.
However, 9 times out of 10, someone just wants to get the stuff installed and hope it works, in which case --legacy-peer-deps will do that. Just make sure you have good test coverage because you're using a different peer dependency version than that specified by a package so something somewhere might not work.
To see if the problem will affect your production app, do npm install --production. If it doesn't give you an ERESOLVE error, then the problem is in your dev dependencies only, which is less of a concern typically.

Error while upgrading EXPO version from SDK 42 to 44

I just tried to upgrade my expo app from SDK version 42 to version 44. I did the following commands:
npm i -g expo-cli
expo upgrade
When I try to run npm install i get this:
The expo package was found in your package.json but we couldn't resolve the Expo SDK version. Run npm install and then try this command again.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: expo-standard-web-crypto#1.2.0
npm ERR! Found: expo-random#12.1.2
npm ERR! node_modules/expo-random
npm ERR! expo-random#"~12.1.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional expo-random#"12.1.0" from expo-standard-web-crypto#1.2.0
npm ERR! node_modules/expo-standard-web-crypto
npm ERR! expo-standard-web-crypto#"^1.1.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: expo-random#12.1.0
npm ERR! node_modules/expo-random
npm ERR! peerOptional expo-random#"12.1.0" from expo-standard-web-crypto#1.2.0
npm ERR! node_modules/expo-standard-web-crypto
npm ERR! expo-standard-web-crypto#"^1.1.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 /Users/michaelschmitz/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/michaelschmitz/.npm/_logs/2022-02-21T19_18_50_348Z-debug.log
I've never updated expo before and am unfamiliar with working with dependencies and package.jsons
here is my package.json as well:
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"update-deps": "npm install -g npm && npm install -g expo-cli && npm install",
"build-ios": "expo bi --release-channel beta -t archive",
"build-android": "expo ba --release-channel beta -t app-bundle"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"#expo/vector-icons": "^12.0.0",
"#react-native-community/slider": "4.1.12",
"#react-native-community/viewpager": "5.0.11",
"#react-native-masked-view/masked-view": "0.2.6",
"#react-navigation/drawer": "^5.12.9",
"#react-navigation/native": "^5.9.8",
"#react-navigation/stack": "^5.14.9",
"base-64": "^1.0.0",
"create-react-class": "^15.7.0",
"expo": "^44.0.0",
"expo-asset": "~8.4.6",
"expo-constants": "~13.0.1",
"expo-file-system": "~13.1.4",
"expo-font": "~10.0.4",
"expo-linking": "~3.0.0",
"expo-mail-composer": "~11.1.0",
"expo-notifications": "~0.14.0",
"expo-print": "~11.1.0",
"expo-sharing": "~10.1.0",
"expo-splash-screen": "~0.14.1",
"expo-sqlite": "~10.1.0",
"expo-standard-web-crypto": "^1.1.0",
"expo-status-bar": "~1.2.0",
"expo-web-browser": "~10.1.0",
"moment": "^2.29.1",
"native-base": "^2.13.15",
"pdf-lib": "^1.16.0",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-actionsheet": "^2.4.2",
"react-native-chart-kit": "^5.6.1",
"react-native-datepicker": "^1.7.2",
"react-native-elements": "^2.3.2",
"react-native-gesture-handler": "~2.1.0",
"react-native-modal": "^11.10.0",
"react-native-modal-picker": "^0.0.16",
"react-native-paper": "^4.9.2",
"react-native-reanimated": "~2.3.1",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1",
"react-native-simple-time-picker": "^0.2.0",
"react-native-svg": "12.1.1",
"react-native-web": "0.17.1",
"utf8": "^3.0.0",
"uuid": "^8.3.2",
"expo-random": "~12.1.1",
"expo-updates": "~0.11.6"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#types/react": "~17.0.21",
"#types/react-dom": "~17.0.9",
"#types/react-native": "~0.64.12",
"#types/uuid": "^8.3.1",
"#typescript-eslint/eslint-plugin": "^4.29.3",
"#typescript-eslint/parser": "^4.29.3",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-react-native": "^3.11.0",
"jest-expo": "^44.0.0",
"typescript": "~4.3.5"
},
"private": true
}
This is in a react-native app and I was previously using version 42.
From your error you should revert back to your last working Expo 42 commit. Then do the following
npm uninstall expo-random
expo install expo-standard-web-crypto
The first will remove any direct dependency to expo-random from your package.json.
The second will reinstall expo-standard-web-crypto to the currently supported version for Expo 42.
Do you your test and commit if it works.
Then retry the update.
General process
The general process I have when doing an upgrade is:
determine what direct dependencies are not needed by the app and uninstall them or move them to devDependencies if it should've been a dev dependency like jest, #types etc.
test to make sure app still works
attempt upgrade
note the errors and deal with the problematic dependencies
dealing with the problematic dependency may simply be updating the version of the dep, or
revendor the improper dependencies yourself since it may take months for any fix to go through upstream,
change your code so you don't use it because the upstream may no longer be maintained except by renovate bots

Can't install "react-native-tab-view-collapsible-header"

When i try run the command on my terminal (pointed to the correct directory): "npm i react-native-tab-view-collapsible-header"
I get errors saying:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: projectname
npm ERR! Found: react-native-head-tab-view#4.0.0-rc.13
npm ERR! node_modules/react-native-head-tab-view
npm ERR! react-native-head-tab-view#"^4.0.0-rc.13" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native-head-tab-view#"^4.0.0" from react-native-tab-view-collapsible-header#2.0.1
npm ERR! node_modules/react-native-tab-view-collapsible-header
npm ERR! react-native-tab-view-collapsible-header#"*" 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
Here is my package.js:
"#react-native-community/masked-view": "^0.1.11",
"#react-navigation/bottom-tabs": "^6.0.9",
"#react-navigation/material-top-tabs": "^6.0.6",
"#react-navigation/native": "^6.0.6",
"#react-navigation/stack": "^6.0.11",
"expo": "~43.0.2",
"expo-status-bar": "~1.1.0",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-gesture-handler": "^1.10.3",
"react-native-head-tab-view": "^4.0.0-rc.13",
"react-native-pager-view": "5.4.6",
"react-native-reanimated": "^2.2.4",
"react-native-safe-area-context": "^3.3.2",
"react-native-screens": "^3.9.0",
"react-native-tab-view": "^3.1.1",
"react-native-web": "0.17.1"
You'll need to use yarn add instead of npm install

react native upgrade library conflict

I am working with a react native project where the existing libraries is compiled to support Android level 29 but now it is mandatory to upgrade to level 30, so I am trying to upgrade the library by running npx react-native upgrade
info No version passed. Fetching latest...
(node:38396) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
info Fetching diff between v0.61.5 and v0.65.1...
info Applying diff...
warn Excluding files that exist in the template, but not in your project:
error Automatically applying diff failed. We did our best to automatically upgrade as many files as possible
warn Continuing after failure. Some of the files are upgraded but you will need to deal with conflicts manually
info Installing "react-native#0.65.1" and its peer dependencies...
error Command failed: npm install --save --save-exact react-native#0.65.1 react#17.0.2
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #react-native-community/async-storage#1.11.0
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"17.0.2" from the root project
npm ERR! peer react#"*" from #react-native-community/checkbox#0.4.2
npm ERR! node_modules/#react-native-community/checkbox
npm ERR! #react-native-community/checkbox#"^0.4.2" from the root project
npm ERR! 16 more (#react-native-community/datetimepicker, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8" from #react-native-community/async-storage#1.11.0
npm ERR! node_modules/#react-native-community/async-storage
npm ERR! #react-native-community/async-storage#"^1.8.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#16.14.0
npm ERR! node_modules/react
npm ERR! peer react#"^16.8" from #react-native-community/async-storage#1.11.0
npm ERR! node_modules/#react-native-community/async-storage
npm ERR! #react-native-community/async-storage#"^1.8.1" 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.
I see ex. async-storage is causing the trouble here. I attach my package.json here, please guide me through the upgrade process?
"dependencies": {
"#react-native-community/async-storage": "^1.8.1",
"#react-native-community/checkbox": "^0.4.2",
"#react-native-community/datetimepicker": "^2.4.3",
"#react-native-community/masked-view": "^0.1.7",
"#react-native-firebase/app": "^8.1.0",
"#react-native-firebase/messaging": "^7.4.1",
"#react-navigation/bottom-tabs": "^5.2.4",
"#react-navigation/native": "^5.1.0",
"#react-navigation/stack": "^5.2.1",
"base-64": "^0.1.0",
"es6-shim": "^0.35.5",
"events": "^3.2.0",
"i18n-js": "^3.5.1",
"lodash": "^4.17.15",
"moment": "^2.24.0",
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-24h-timepicker": "^1.1.0",
"react-native-common-date-picker": "^2.3.1",
"react-native-date-picker": "^3.2.5",
"react-native-document-picker": "^4.0.0",
"react-native-elements": "^1.2.7",
"react-native-file-type": "0.0.8",
"react-native-fs": "^2.16.6",
"react-native-gesture-handler": "^1.6.0",
"react-native-linear-gradient": "^2.5.6",
"react-native-localize": "^1.3.4",
"react-native-popup-menu": "^0.15.7",
"react-native-push-notification": "^4.0.0",
"react-native-reanimated": "^1.7.0",
"react-native-safe-area-context": "^0.7.3",
"react-native-screens": "^2.3.0",
"react-native-snap-carousel": "^3.8.4",
"react-native-svg": "^12.0.3",
"react-native-svg-charts": "^5.3.0",
"react-native-swipe-list-view": "^3.1.0",
"react-native-vector-icons": "^6.6.0",
"react-native-view-overflow": "0.0.5",
"react-relay": "^9.1.0",
"relay-runtime": "^9.1.0",
"rn-apple-healthkit": "^0.8.0",
"rn-fetch-blob": "^0.12.0",
"styled-components": "^5.1.1",
"twilio": "^3.48.1",
"twilio-chat": "^4.0.0"
},
my target lib for react native is the latest, but of course any lower version that make android level 30 will work
"dependencies": {
"react": "17.0.2",
"react-native": "0.65.1"
},

react-native-gesture-handler can not be installed and shows compilation error

I initially tried using the react-native-elements for icons and other components. I followed the documentation to set things up but the icons were visible as a cross in a rectangle. During this I linked the vector icons by running "react-native link react-native-vector-icons" and also had added the following in setting.gradle in the android folder of the project:
rootProject.name = 'Vida'
apply from: '../node_modules/react-native-unimodules/gradle.groovy'
includeUnimodulesProjects()
apply from: file("../node_modules/#react-native-community/cli-platform-
android/native_modules.gradle");
applyNativeModulesSettingsGradle(settings)
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new
File(rootProject.projectDir,
'../node_modules/react-native-vector-icons/android')
Also the mainApplication.java file needed changes so I changed it to following:
#Override
protected List<ReactPackage> getPackages() {
List<ReactPackage> packages = new PackageList(this).getPackages();
packages.add(new ModuleRegistryAdapter(mModuleRegistryProvider));
package.add(new RNGestureHandlerPackage()); // THis is the change I made for handling gestures.
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new VectorIconsPackage() // THis is the change for vector Icons
);
}
I also added the
implementation project(':react-native-vector-icons')
implementation project(':react-native-gesture-handler')
to build.gradle file.
After I restarted the app by first "react-native start" and "react-native run-android" and I came across "null is not an object ( evaluating 'RNGestureHandlerModule.default.Direction')" in my android emulator after which I tried searching online for solution and some saidn unistalling and reinstalling react-native-gesture-handlers will solve it so I tried uninstalling and reinstalling the gesture handler and tried restarting the meteor server and run "react-native run-android". But rather, I came across an error saying:
C:\Vida\VidaApp#20\VidaArchive\android\app\src\main\java\blah\com\MainActivity.java:8:
com.swmansion.gesturehandler.react does not exist
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
^
C:\Vida\VidaApp#20\VidaArchive\android\app\src\main\java\blah\com\MainActivity.java:37:
find symbol
return new RNGestureHandlerEnabledRootView(MainActivity.this);
^
symbol: class RNGestureHandlerEnabledRootView
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option output. Run
with --scan to get full insights.
* Get more help at https://help.gradle.org
eact does not exist
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;;
^ ivity.java:37:
C:\Vida\VidaApp#20\VidaArchive\android\app\src\main\java\blah\com\MainActivity.java:37: error: cannot
find symbol his);
return new RNGestureHandlerEnabledRootView(MainActivity.this);
^
symbol: class RNGestureHandlerEnabledRootView
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
-debug option
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more
log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 38s
t-native-commu
at checkExecSyncError (child_process.js:635:11)
at execFileSync (child_process.js:653:15) tive-community
at runOnAllDevices (C:\Vida\VidaApp#20\VidaArchive\node_modules\#react-native-community\cli-platform-
android\build\commands\runAndroid\runOnAly\cli-platformlDevices.js:94:39)
at buildAndRun (C:\Vida\VidaApp#20\VidaArchive\node_modules\#react-native-community\cli-platform-
android\build\commands\runAndroid\index.js:17dules\react-na9:41)
at C:\Vida\VidaApp#20\VidaArchive\node_modules\#react-native-community\cli-platform-
android\build\commands\runAndroid\index.js:133:12
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Command.handleAction (C:\Vida\VidaApp#20\VidaArchive\node_modules\react-
native\node_modules\#react-native-community\cli\build\index.js:182:9)
Also while I tried uninstalling gesture handler, visual studio crashed out and i had to open again and after I launched Vscode I reinstalled gesture-handlers, it showed the following error:
$ ...include ':react-native-gesture-handler'
bash: ...include: command not found
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: file-uri-to-path#1.0.0 (node_modules\file-uri-to-
path):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename
'C:\Vida\VidaApp#20\VidaArchive\node_modules\file-uri-to-path' ->
'C:\Vida\VidaApp#20\VidaArchive\node_modules\.file-uri-to-path.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: nan#2.14.2 (node_modules\nan):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename
'C:\Vida\VidaApp#20\VidaArchive\node_modules\nan'
-> 'C:\Vida\VidaApp#20\VidaArchive\node_modules\.nan.DELETE'
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path C:\Vida\VidaApp#20\VidaArchive\node_modules\#egjs\hammerjs
npm ERR! dest C:\Vida\VidaApp#20\VidaArchive\node_modules\#egjs\.hammerjs.DELETE
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename
'C:\Vida\VidaApp#20\VidaArchive\node_modules\#egjs\hammerjs' ->
'C:\Vida\VidaApp#20\VidaArchive\node_modules\#egjs\.hammerjs.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Shiri\AppData\Roaming\npm-cache\_logs\2020-10-31T07_52_44_306Z-debug.log
Currently my package.json file is as below:
{
"scripts": {
"start": "react-native start",
"android": "react-native run-android",
"ios": "react-native run-ios",
"web": "expo start --web"
},
"dependencies": {
"#react-native-community/masked-view": "^0.1.10",
"#react-native-community/netinfo": "^5.8.1",
"#redux-offline/redux-offline": "^2.6.0-expo.0",
"bootstrap": "^4.5.2",
"expo": "~37.0.3",
"expo-linear-gradient": "~8.1.0",
"expo-screen-orientation": "^1.0.0",
"expo-splash-screen": "^0.2.3",
"expo-updates": "~0.2.0",
"pusher-js": "^7.0.0",
"react": "~16.9.0",
"react-bootstrap": "^1.3.0",
"react-dom": "~16.9.0",
"react-native": "~0.61.5",
"react-native-agora": "^2.9.1-alpha.7",
"react-native-banner-carousel": "^1.0.3",
"react-native-country-list": "^1.0.10",
"react-native-elements": "^3.0.0-alpha.1",
"react-native-gesture-handler": "~1.6.0",
"react-native-material-dropdown": "^0.11.1",
"react-native-material-textfield": "^0.16.1",
"react-native-reanimated": "~1.7.0",
"react-native-rename": "^2.4.1",
"react-native-safe-area-context": "^1.0.0",
"react-native-screens": "^2.7.0",
"react-native-snap-carousel": "^3.9.0",
"react-native-svg": "11.0.1",
"react-native-unimodules": "~0.9.0",
"react-native-vector-icons": "^7.0.0",
"react-native-web": "~0.11.7",
"react-navigation": "^4.3.9",
"react-navigation-stack": "^2.5.1",
"react-redux": "^7.2.0",
"redux": "^4.0.5",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
"socket.io-client": "^2.3.0"
},
"devDependencies": {
"#babel/core": "^7.8.6",
"babel-jest": "~25.2.6",
"babel-preset-expo": "~8.1.0",
"jest": "~25.2.6",
"react-test-renderer": "~16.9.0"
},
"private": true,
"name": "VidaArchive",
"version": "1.0.0"
}
I need this issue to be fixed early because I need to show my work to my seniors. Also I am new to react-native environment, Hence, my concerns are:
How to set up and use react-native vector icons for android (alongwith third party libraries)?
What is this issue, RNGestureHandler?
It says Package react-native-gesture-handler has been ignored because it contains invalid
Reason: Cannot find module 'react-native-gesture-handler\package.json'. What is this and what is causing it so and how can I fix this?