Questions tagged [unhandled-promise-rejection]

84 questions
0
votes
0 answers

Keep getting 'x is not a function' error in Discord.js broadcast

I keep getting an 'x is not a function' error and can't figure out what's causing it. I've tried attaching the Playlist Manager to the StreamData and it still won't accept it. The stream data is being returned correctly in the on finish emit except…
0
votes
1 answer

Why is make-promises-safe only for use in "in top-level program code"

The make-promises-safe package changes Node.js's default behavior with regards to errors thrown in promises. Normally, in Node, these unhandled promise rejections will be logged, but a program keeps on running. With make-promises-safe installed,…
Alana Storm
  • 164,128
  • 91
  • 395
  • 599
0
votes
1 answer

Discord embed command

I tried to use the following ping command, but when I trigger it, it gives me the following error: The code: const Discord = require('discord.js'); module.exports.run = async (bot, message, args) => { let waiting = await…
0
votes
2 answers

Issue connecting node with mongodb

I just started building my first MERN app, and when I tried to connect to mongoDB, I have issues. Here is my code: const express = require("express"); const cors = require("cors"); const mongoose =…
0
votes
1 answer

Unhandled promise rejection inside a catch

I'm getting the following error inside a catch: Blockquote UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originared either by throwing inside of an async function without a catch block, orby rejecting a promise which was…
jenkinz
  • 139
  • 10
0
votes
1 answer

Unhandled promise rejection stripe paymentIntent example

I'm trying to setup a stripe payment app using node and express, following the example here: https://stripe.com/docs/payments/accept-a-payment#web I created the route in my server side app code as indicated, and inserted the client-side code in my…
-1
votes
1 answer

Axios catch crashes code, marked "UnhandledPromiseRejection"

I am trying to handle an axios call failure. I wrote the function and the code: async function createFunction (url, APIKEY, vendorType) { return new Promise((resolve, reject) => { const options = { method: 'post', maxBodyLength:…
Nimrod Yanai
  • 777
  • 2
  • 8
  • 30
-1
votes
1 answer

UnhandledPromiseRejection undefined problem

I hope you can help me. I am developing a functionality that reads a series of data (data is taked from csv file) and checks if it has to put it in a list or not. The problem comes when I start to check the data (through promises) since it gives me…
-2
votes
1 answer

I am facing some issues related to expo ejection

When I run expo eject on an empty project created by create-react-native-app or my complete project created in the same way, I get the following error: Error: Group by name c:/Users/#folder-path#/ios/#projectname# not found! The folder above does…
1 2 3 4 5
6