Skip to content
Advertisement

Tag: node.js

How can I get returned string values in fetch()

Below code is my fetch method in my separate register.js. This is my newly created js file, so I can create my front end. At the moment I’m just trying to console.log the ending result for this fetch, but can’t get the output since I’m getting an error when I try to POST this. error in browser console: “Uncaught (in

Callback error when calling endpoint function

I’ve received an Node.js api documented with swagger for debbuging. I also have to make some features in it, but I’m having some trouble when calling, in the code, the functions executed when you hit an specific endpoint. To make my self clear: Works fine from Swagger UI when I only give it the argument of the ID required in

How to access data inside double square brackets in NodeJS

I need to access comment from posts array and based on the comment id I have to update the comment status. I can see the format of comment inside posts array as below: { id: ‘5fdcd812’, title: ‘post1’, comment: [ [ ‘c903c4dc’, ‘commentcontent’, ‘pending’ ] ] } Since comment is having two ‘[‘ brackets when I search for comment.id it

Method returns undefined the first time it is called

I have a method that selects distinct values from a database as shown below: I then have a button with the method POST and action /categories The displayCategories is called when the button is clicked as follows: I added some console logs for test purposes. The issue I am having is that the first time I click the button, it

Nuxt app failed heroku deployement code=H10 error

I’m trying to deploy my ecommerce nuxt app to heroku. Here’s exactly what I did then I followed exactly what the heroku website did list. Everything works Once I visit the link, however, I get an error: After following the heroku tail command, the app keeps crashing with the following error Now i know that this problem has already been

Screen sharing issue in WebRTC/nodejs with socket.io

im working on a vidoe conferencing application and I cant seem to get the screen sharing working getting an error “mediaTypeError: Cannot read properties of undefined (reading ‘getSender’)”. The screensharing is able to start but nothing is being shared This is my server file. Codes for screensharing where there seem to be an issue with getSender Github link for the

Advertisement