(node:53177) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'message' of undefined
Asked Answered
M

1

7

Not sure what has caused this issue.. It worked fine yesterday. Today when I tried to run react-native run-android. I get this error. any ideas?

Starting JS server...
Running adb -s 3f71ece6 reverse tcp:8081 tcp:8081
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

(node:53177) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'message' of undefined
Mica answered 4/1, 2017 at 17:1 Comment(2)
From what I noticed this error started to appear for me when I updated nodeJs. Now I have v7.3.0Ankylose
I'm using Node 6.9.2 .. hmmmMica
I
3

I had a similar problem trying to run a project created on Windows on Ubuntu. The solution I found was that the gradlew file in project/root/android was not set as executable. So simply adding a chmod +x gradlew solved this issue for me.

Illnatured answered 31/1, 2017 at 0:44 Comment(2)
that was exactly it for me. My project was originally started on a windows machine, and this error happened when cloning onto mac. Just one of those magical one lines that solved something I thought would take hours. Thanks!Odaodab
How do I do this in 2018?Episiotomy

© 2022 - 2024 — McMap. All rights reserved.