Most voted "node.js" questions
Node.js (or commonly Node) is a Javascript Runtime created with Chrome’s Javascript V8 engine. It allows you to run Javascript code without the need for a browser, raising the privileges to those found in other desktop languages. It is a technology strongly focused on non-blocking programming of I/O operations, which makes it very efficient for these operations.
Learn more…2,679 questions
Sort by count of
-
0
votes1
answer69
viewsAuthenticate mongodb with Docker
I’m starting studies with Docker and mongodb, I can’t authenticate, I would like to have a user and password for mongodb (container). If you can guide me how to create a user and password, I have to…
-
0
votes0
answers106
viewsPromise.all hangs and does not resolve all languages and applications - Node.js
I’ve had a problem for a while, and I can’t figure out why. In my application I will have an array of ID’s of product categories, and from this array, for each category I want to recover all…
-
0
votes0
answers20
viewsExpress does not run route
This is my index, but when calling the drones route, it displays the error: CANNOT GET /drones/ But before it worked normally, it stopped working suddenly. const express = require('express'); const…
-
0
votes0
answers96
viewsPersist json file information in Database
I would like some help with a question related to nodejs. I am trying to save information I receive from a local json file to the database. this file brings me several objects, and what I need to do…
-
0
votes1
answer23
viewsType error in Class method, [Ignore this and say the method does not exist]
Good morning, I am facing a little problem, when calling via the express route a class method Controllercontact he says the method does not exist. const nodemailer = require('nodemailer')…
-
0
votes1
answer38
viewsRefresh page when making BD changes
Goal My final project involves making a chat room; the user must enter a message, this message is handled in the server.js(Node.js file) and inserted into the database. The page should then be…
-
0
votes1
answer45
viewsIs the use of the operator "and" in this code correct? Because it is not working
The function of this code is to receive the login data through the req and do with query to see if the records exist and the user can access certain area, but the code below not be indifferent as…
-
0
votes0
answers21
viewsMongoose - Filter by foreign ownership
Good afternoon, I need to know how to do it, using Mongoose, to filter a model from a foreign property. For example: const Usuario = new Schema ({ nome: { type: String, required: true }, cargo: {…
-
0
votes1
answer75
viewsIf/Else block not working in Javascript
I’m starting in Javascript and I’m creating a Whatsapp bot on Node.js and any block if that I put does not work and always goes to else. It works that way: Get the message; Query the Sqlite database…
-
0
votes0
answers47
viewsHow to resolve Cors error in Node
I did my backend with Node/express normally and tested all routes in India and everything took place normally at the front(vuejs) made requests via Xios, all routes also worked, except the…
-
0
votes1
answer33
viewsSend the result of two Mysql tables to a view (ejs)
I am working with Ejs and Node.JS with Mysql. I need to move to a two table info calculation view, but I am facing this error: app.get("/calc", (req, res)=>{ Palpite.findAll().then(calc =>{…
-
0
votes0
answers22
viewsMy Node JS API, which uses a Child process, works when run by nodemon, cmd but in PM2 generates error
My API runs a python script through an Express route, using Child process, I have tried to run only the script using python nameScript and it worked, I do not know why is giving this Python ENOENT…
-
0
votes1
answer57
viewsError: Undefined Binding(s) when I’m going to give a
I’m trying to make a login system , I wrote the code and when I do it works perfectly , but when I made the connection to the front end using Axios it can’t send the typed data to the database. I…
-
0
votes0
answers17
viewsJoin does not work on Objection.js
I’m using Objection.js to build my Models using Node Typescript. I have a projects table that can have a user, so I have a foreign_key id_usuario in the projects table. So far so good, but when I…
-
0
votes0
answers45
viewsHow to Calculate Nodejs Points with mysql and sequelize of several Users
Calculo Onde puxo informções do banco || calculo acontece de forma correta pore o envio para o banco atravez do update funciona não corretamente. Basically it would pull through a loop pass through…
-
0
votes1
answer91
viewsExpress runs but does not work. JS Node
Good afternoon everyone, I’m having a little problem with the server express in a Node JS application with typescript, typeorm and postgres SQL where when executing the command npm run dev the…
-
0
votes0
answers24
viewsHow to perform Join with another bank table, with different Rvers, using Sequelize?
I have a connection with two databases, with different servers, and would like to perform the Join between the tables of the two banks, using querybuilder. Would someone please help me? import…
-
0
votes0
answers74
viewsWhy is the typeorm find method returning me a string instead of an array?
I have a tool modem as it lies below: import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn, OneToMany, } from 'typeorm'; import OrdersTools from './OrdersTools';…
-
0
votes0
answers40
viewsType Orm Relations between entities does not bring the data
My question is how the typeorm brings data from your relationships. const user = await this.userRepository.findOne({ where: { id }, relations: ['userAddress', 'emails', 'phone_numbers', 'person',…
-
0
votes1
answer78
viewsHow to recover a customer’s IP?
I am working on my first professional project using Node.js. In it I make changes to security groups of EC2 AWS instances. One of the data in which the system performs updates is the client’s IP. I…
-
0
votes1
answer73
viewsReferences with Mongoosis
I currently have 3 Collections in my project, and I need 2 of them ("Course" and "Lesson"), have a link, I want when adding a "Lesson" it to be inserted in a "Course" through a push, but is giving…
-
0
votes1
answer38
viewsHow to send files to a static website on S3
I’m developing an application in Nodejs using the AWS SDK. Summarizing the code creates a Bucket, assigns the security policies to allow public access, and enables it to static websites however,…
-
0
votes0
answers29
viewsExpressjs: Is he addicted?
Good morning, dear friends, I am with a project in Expressjs where the function is to use a login panel to generate an HTML file with EJS template containing the attributes of the user who logged…
-
0
votes0
answers20
viewsDownload S3 object in Node with typescript
I am developing an XML signing API with digital certificates in P12/pfx format. These certificates are stored in a S3 Bucket. The API is being built using Node and Typescript. My problem is the…
-
0
votes1
answer26
viewsHow do I perform more than one database query on a single request . GET on the same route on NODE.JS?
I am creating an API for a personal project, and I need to make 2 queries to the database in the same GET request. My code looks like this: module.exports = { async listarAnual(req, res, next){…
-
0
votes1
answer27
viewsnavbar-Brand + Toggler
I am studying bootstrap and during a project I could not achieve the desired effect. In case the group of buttons that was to be on the right of the screen, on the other side of the line, will not.…
-
0
votes0
answers26
viewsUpdate error in relation @Manytoone with Typeorm
Good afternoon, in my application I have the relation that an Order can have several Deliveryrequests. But when I do a save(order) it is updated correctly but an SQL settando is generated as NULL…
-
0
votes0
answers43
viewsload infinity nodejs
Hello, I am doing a small application in Ode and I am facing the following problem, my routes are not loading in the browser. I’m new to nodejs, so it might be something I still don’t understand,…
javascript node.js web-application express back-endasked 3 years, 5 months ago Cláudio Vitor Dantas 11 -
0
votes0
answers16
viewsCould someone help my Recovery interface is giving error - check
verificarRetornoHttp(**resp**){ if(resp.status >= 400){ this.exibirMsgAlert("Erro ao realizar a requisião!", "erro"); return true; }else{ if(resp.body.erro) { this.exibirMsgAlert(resp.body.msg,…
-
0
votes0
answers49
viewsHow do I resolve this error Cannot read the indefinite color property
I’ve tried to change color change Theme but nothing works I’m creating an app with expo using nodejs and with Visual Studio Code const hideErrorMessage = !renderErrorMessage &&…
-
0
votes1
answer48
viewsDoubt regarding the existence of an "if" in the code
Question statement: Construct a function that will receive two Strings of varying sizes and will return True or False if all characters (regardless of whether they are upper or lower case) are…
-
0
votes1
answer123
viewsError Sending Message with Venom js
I’m using Venom.js to send messages by Whatsapp, it works perfectly, as long as the client sends the first interaction, ie when I try to send some basic text, at first it sends, but the second time…
-
0
votes1
answer20
viewsSimple GET Request
I’m trying to consume a Federal Board of Medicine API but so far unsuccessful. This is a very simple GET request: https://portal.cfm.org.br/api_rest_php/api/v1/medicos/buscar_foto/9666/PA Where the…
-
0
votes1
answer42
viewsInsert a success message after Location.Reload()
I would like to add a successfully edited message via JS after reloading the page. The message is displayed before reloading the page and not before. Follows my code: Call AJAX: var resposta =…
-
0
votes0
answers16
viewsCors error with socket.io: No 'Access-Control-Allow-Origin' header is present on the requested Resource
I have an API with a running socket.io instance, configured as follows: const sock = socketIo(server /* servidor express */, { origins: [CONFIG.frontend /* variavel que contem a url do front */],…
-
0
votes2
answers43
viewsHow to deserialize JSON Array in an Object Array?
I’ve been trying for a while to deserialize a JSON return from my nodejs api. I’ve tried many ways and no success. I have the following client request return JSON. "response": { "count": 1,…
-
0
votes0
answers22
viewsMongoose finds but does not update the document
I am using Mongoose in my code and can’t update documents, but with mongodb it works normally, whenever I try to update a document, it returns the following results and does not update the document:…
-
0
votes1
answer55
viewsError in Javascript. "prompt not set"
I decided to make a project of calculation of average school with conditional, where I can perform the calculation n times, or finish if you wish. No replit.com is running, but VS Code is giving…
-
0
votes1
answer28
viewsWhat is the difference between a Sync and Async method in Node.JS?
I am developing a file upload application on Node.JS. There is a snippet in the code that transfers the file to a specific folder on the server... router.post('/', (req, res, next) => { const…
-
0
votes0
answers56
viewsHow to allow a method to execute another method of the same Typescript class?
I am working with a class that manages the registration and login of new users. Imagine that this class has two methods, the first isCharacterNameRegistered() checks if the nick already exists, and…
-
0
votes0
answers26
viewsNode.js| problem when serving files from dist folder generated by webpack
I have a web application that uses Webpack to package the files. After running the "npm run build" command the webpack generates a dist folder containing the bundled files. The application worked…
-
0
votes0
answers19
viewsReturn Rows through IPC in Electronjs
Save my friends. I’m studying a little bit about Electron, and I came across the following problem in interprocessual communication. I have an index.html (rendered process) that emits an event pro…
-
0
votes2
answers35
viewsI cannot return the requested amount ( Mongodb )
I’m trying to make a list of names of people who are registered in my database, and print on the web The model I’m using is this const mongoose = require('../../database/conn') const bcrypt =…
-
0
votes1
answer33
viewsProblem with recovering the return of a Promisse
Before I was with a problem that when there was some error in the execution of the query the server stopped and had to restart to get back to work, so giving a search I found how to solve the…
-
0
votes1
answer24
viewsWith Javascript is it possible to automatically execute a function on another part of the file?
I have two separate pages: The first contains a form with two fields input of the kind date, among other information. The second page receives a data from the form information that I mentioned…
-
0
votes0
answers13
viewsMongodb (Mongoose) does not update properties of an object array type document
I have a 'document' of users that has a tag field of type Array that receives objects, these objects are posting tags that store all tags used by it and the amount of repetitions. The problem is…
-
0
votes0
answers20
viewsError 400 (Bad Request)
I’m trying to chat in Ode js, but when I start the server.js and enter the site, an error appears: GET http://localhost:3000/socket.io/?EIO=3&transport=polling&t=NfTIQ3t 400 (Bad Request)…
-
0
votes1
answer21
viewsI cannot insert data into the SQLITE3 table (NODE.JS)
Whenever I try to add data the SQLITE table appears this error. Someone helps me, pfv. I’m starting at the Back-end now ;-; const Database = require("../db/config") module.exports = { async…
-
0
votes0
answers42
viewsDynamically transform objects into JSON
I’m trying to back up chats from Discord but I’m having difficulties in adding the objects JSON dynamically. As I can create a complete path at once and if a part of that path already exists it…
-
0
votes1
answer12
viewsRabbitmq on Node.js with ampqlib not broadcasting the messages
This script should be a command-line chat type only for rabbitmq study. Executions of the program would be opened in parallel. Each execution creates a Sumer from the same queue and all text sent by…