Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 6 months ago. Improve this question I am…
Tag: node.js
Discord.js v13 Bot doesn’t collect messages in DMChannel
I’m trying to make a captcha verification system for my discord bot. So when someone join a server the bot will DM the user a captcha and the user have to solve the captcha in a given time period to get a specific role in the server but my bot doesn’t seem to collect the user’s message. I…
Using JavaScript, how can I pull info from a database and order it in a list?
I have a rough idea on how to do this, but it doesn’t seem to be working too well. What I have already achieved is pulling all of the data necessary that needs ordered. What I need is a way to take all of that information and order it from the highest number to the lowest number, and then display
axios.spread() cache my API whereas axios.get() does not
I’m facing a weird situation where I need to call a bunch of my CMS API routes from my server in order to use their response.data into an object that will then be passed to my client side. This is the code that caches my data: meaning that when I change a field on my CMS, that data that is
How can I process more than 500 MB worth of images?
Code works fine when it’s processing less than 500 MB worth of images. (I’m trying to do +25 GB worth) Is there a way to modify the code to get it to work with a larger quantity of images? I get an error that looks like this: node:internal/process/promises:279 triggerUncaughtException(err, true /*…
How to send a sorted result from my MongoDB database by clicking on a button?
I have this code where i send my collection to index.ejs In index.ejs I want to sort my collection by rating from button. What way can I do it? Answer You can add in index.ejs an anchor tag that would send a request to / with a url param, something like this for example: You change you request handler, so
Error cause property not recognized in TypeScript
I stumbled upon the possibility to add a cause to the Error constructor in javascript. But when I try to use this feature my app does not start as it does not know this “new” constructor arg. All of the following commands stop with the above compile error I added the following script to my package…
How can I transfer an image from html to nodejs to use it with ejs?
I was trying to create a new website using nodejs and expressjs. Basically I have a page (/ home) where there is a form with an input file. I have already created the code to show the preview of the image once loaded … what I would like to do is essentially transfer the “link” of the image t…
Getting Error while posting a request, ValidationError: TodoTask validation failed: user: Cast to ObjectId failed for value
i am getting an error while trying to post a todo to the database. ValidationError: TodoTask validation failed: user: Cast to ObjectId failed for value My function for posting the request : Schema is defined as : Answer Since the user property is defined as a ref you should just store the _id in it: When retr…
NodeJS Can only connect when Server is shutdown
Im trying out setting up a webserver with nodeJS with this code: But when I connect on any browser(tried chrome and mozilla) using either localhost or 127.0.0.1 the page will only show when I shut the server down. It’s constantly loading, not showing anything until I shutdown with ctrl + C. Then it will…