ifactory-solutions / awesome-react-app

Always the latest version of "create-react-app" with awesome configurations (lint, commit lint, husk, editor config, etc)
MIT License
45 stars 7 forks source link

Unhandled Promise Rejection Warning #11

Closed italopessoa closed 6 years ago

italopessoa commented 6 years ago

Since there's already an f1 folder, create-react-app raises an error with a message containing suggestions on how to fix it, but the error is not handled by awesome-react-app and this causes the message below:

(node:14180) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): undefined

image

UPDATE: this is happening every time a promise is rejected but the code doesn't handle it.

function unhandledPromiseRejection(promise) {
   promise.then(() => console.log('success'))//Unhandled Promise Rejection Warning
}

every promise that behaves like the code above should be fixed.

to test your implementation install awesome-react-app npm i -g awesome-react-app create a react project awesome-react-app project try to create a project with the same name in the same folder

swyxio commented 6 years ago

claiming!

jvcjunior commented 6 years ago

Go ahead @sw-yx!! Feel free to get this one if you want to! Just let us know, please!

swyxio commented 6 years ago

passed to my buddy seth to make his first PR - please be kind! (but also we didnt have a lot of guidance on what exactly to handle)

italopessoa commented 6 years ago

nice @sw-yx. and don't worry, we'll do our the best to help him

jvcjunior commented 6 years ago

Great team work @sw-yx !! Let us know if you have questions. We all are here to help! we appreciate your efforts.