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
-
-2
votes1
answer888
viewsPage with Reactjs consuming from an API
Yesterday I was having a problem in being able to create a page with nodejs for my API and with help from the community got me a north and I managed to solve that situation. What’s the idea? There…
-
-2
votes1
answer420
viewsError 404 in POST with NODE and REACT
I am building an application with nodejs in the back end and React in Frond-end. I made a registration function but I can not perform the POST, returning: xhr.js:178 POST http://localhost:3333/users…
-
-2
votes1
answer44
viewsThere is something wrong with creating an React project
When trying to create a new React project the action is not completed. I will attach prints with errors and versions. I have tested many commands I saw on the internet, but none solved my problem. I…
-
-2
votes1
answer570
viewsGroup By with Sequelize
I have the following class structure: I’m trying to group and count Sequelize how many titles each selection had from the table Cup_Selections same as the query typed below: My Node consultation…
-
-2
votes2
answers380
viewsThe set function of the state of the React is not actually receiving and passing on the values
I don’t know pq, but when I try to make a request for my backend, the state of "posts" does not receive the value of Answer.data. That is, the two "console.log" have different values, while…
-
-2
votes1
answer176
viewsReal-time website with Node.JS
Come on, guys, can someone help me with this... I developed a fully dynamic website with Mysql database, that is, all the main elements of the main page are coming from the database, I do this using…
-
-2
votes2
answers217
viewsNodejs and Mysql: Query 3 columns
I need to make sure that the user will not be able to register the registration: email, cpf or cnpj again. I have a code, which I can restrict email. How to implement the code to check in the table…
-
-2
votes2
answers180
viewsKeyword Search Assign If and Else with Javascript
Hello folks I am trying to make an automated freight selection in my shop, why the integrated shop platform does not offer specific freight option for products, so I have: Conveyor: Only for…
-
-2
votes3
answers130
viewsTable with data array
Why the table only appears data if you set the position of the element in the array? import React from 'react' import Head from 'next/head' import { Table } from 'reactstrap' import axios from…
-
-2
votes1
answer170
viewscannot GET // React
We created our first project in React, local everything works normal.. When we host on the web ... the system enters the address for example https://www.dominio.com/painel_teste At that moment…
-
-2
votes2
answers152
viewsError loading CSS file, cannot find directory
I’m making a simple app, but I’m getting all confused in accessing the folders. I want to call the about.css file inside the layout.njk file. The directories I’ve tried none of worked. The structure…
-
-2
votes1
answer420
viewsPROBLEM CLICKING WITH A ROBOT USING PUPPETEER
I am creating this robot to automate some tasks of the I day by day, I ask him to access the site, click the input, and then log in. He accesses the page, but he’s not clicking, I can’t find the…
-
-2
votes1
answer44
viewsProblem validating input
I have a code where the user inserts the student ID and so it is redirected to a page with only the student presences, but if the user does not enter any data in the input it displays all presences,…
-
-2
votes1
answer100
viewsAssign automatic email sending to a button using nodemailer
I own a site and I would like that when the user sent a message through the contact, the site sent me this message via email... already configured the sending and is working using NODEMAILER const…
-
-2
votes2
answers176
viewsExtract XML file from a ZIP file
The code below makes a request to a Webservice that returns me an XML file inside a ZIP file. myXMLText = '' request({ url: "http://webservice.newrastreamentoonline.com.br/", method: "POST",…
node.jsasked 3 years, 10 months ago Otavio Fedrizze 1 -
-2
votes1
answer49
viewsHow to separate the logic of the interface in queries with mongodb and nodejs
I’m studying Mongodb and Nodejs, I’m starting . I downloaded an example code from git and started to customize. The original query code was like this: router.get('/products/:page', (req, res, next)…
-
-2
votes1
answer102
viewsBelongstomany Relationship - Sequelize
Hello, I have a problem in listing records with belongsToMany association using sequelize + nodejs. I have the tables Developers and Technologies. The relationship between them is Many to Many. To…
-
-2
votes1
answer563
viewsPopular Chart.JS with Mysql data passed in the page render by an async function
Speak people, I’m wanting to popular a pie chart on my Dashboard page, but I’m not getting, can help me (I don’t want to use php, only javascript, jquery and html). Chart: Chart.JS BD: Mysql…
-
-2
votes2
answers83
viewsProblem when deleting item in a json file
When accessing this route that deletes an item: app.get("/excluir/:id/:categoria", (req, res) => { let dados = JSON.parse(fs.readFileSync("./data/dados.json", "utf8")); var id = req.params.id;…
-
-2
votes1
answer432
viewsPassword encryption with Crypto on Node js
Well I have an application that needs a password encryption, I’m using crypto of node js to do the encryption, but I can do the encryption but I can’t decrypt it so I can authenticate the user. You…
-
-2
votes1
answer37
viewsProblem while uploading file
I am performing an operation where basically the client will be sending the images you want to the server. This way the way I am putting to occur the rescue is correct, but the user will not be…
node.jsasked 3 years, 9 months ago André Cabral 87 -
-2
votes1
answer23
views$ npm test -- --spec=usingPageObjectTest.js does not run the test
Can someone tell me a solution? Running $ npm test -- -spec=usingPageObjectTest.js does not work: [email protected] test C:\wagner.galvao\node\webdriverioframework wdio wdio.conf.js…
-
-2
votes1
answer52
viewsReturn value of a NODE function
Hello I’m starting with NODE. I have the function below and would like it to return the translated text. Today she plays the text to the console. How do I get her to return the text? How would it…
-
-2
votes2
answers90
viewsMy localhost route:3000/files/ does not show the image ( express.Static does not return the image)
In my static file path, it finds the image but returns only its binary and not the image itself for the view. What I want is to be able to view the image when placing in the browser for example:…
-
-2
votes2
answers194
viewsSending e-mail with Nodejs and nodemailer
I understand that there are some posts about how to send email using Nodejs and nodemailer, but after many attempts I still receive the fault Answer: '535-5.7.8 Username and Password not accepted…
-
-2
votes1
answer108
viewsUpload Multifiles with Multer , express , nodejs and query to Mysql
How to query the name of two different images for mysql? I’m using a woman to upload more than one image, and the code I used is working perfectly. The images are loaded into my briefcase imgpost.…
-
-2
votes1
answer51
viewsArray formatting
Good morning, everyone! I have a question about formatting an array in javascript. My code is that way. var oidup = ['5006144', '5006146']; //valores oid especifica var oids =…
-
-2
votes1
answer47
viewsHow not to repeat information in a js Node file
You guys, I got this comic: const fs = require('fs'); const produto = { nome: 'Smartphone', preco: 1749.99, descontoo: 0.15 } fs.appendFile('mynewfile2.txt', JSON.stringify(produto), err => {…
-
-2
votes1
answer98
viewsAdd database data from an Array in Nodejs using typescript
I am developing an Application in Nodejs that has the following entity: import User from '@modules/users/infra/typeorm/entities/User'; import { Entity, Column, PrimaryGeneratedColumn,…
-
-2
votes1
answer19
viewsReceive message request via Whatsapp with webhook
I need to create a webhook to respond to a request coming from Whatsapp. I created the webhook route on the server pointing to my computer and am using ngrok to test it. I can make a request using…
node.jsasked 3 years, 3 months ago Roberto Vieira 5 -
-2
votes2
answers54
viewsConditional If inside map() with Function
Hello! I have a line of code like this: if (searchQuery.length != 0) { return ( <Row hidden> {searchQuery.map((res) => ( In this snippet of code, I’m trying to add a if shortly after the…
-
-2
votes1
answer26
viewsHow to render an asynchronous function in reactJS?
My problem is this: I have an asynchronous function that makes a mysql request and, depending on the result of the request, returns a different DIV. const GetData = async(idAluno,disciplina) => {…
-
-2
votes1
answer35
viewsTwitter API returning "Status is a Duplicate"
I’m creating a bot on Twitter to respond every time it’s mentioned with random text. It’s working fine, but the problem is that the API returns the "Status is a Duplicate". This is the part that…
-
-2
votes1
answer60
viewsFailure to assign constant value
I’m trying to create a function to register users, but has a constant that is not assigning the value of the request, follow the code I currently have: Services async create(req, res) { const user =…
-
-2
votes1
answer48
viewsCalculating dates (Discord.js)
I’m trying to develop a kind of Mod record for my Discord Bot. Ps: I do not believe it is necessary knowledge of Discord.js to solve the question How it would work: The user with administrator…
-
-2
votes2
answers27
viewsSQL command works on SQL SHELL, but does not work on Node (pg) (probably something related to accentuation)
DATABASE I have this database: In it I have this table: In it I have this data: NODE const express = require('express'); const app = express(); const cors = require('cors'); // cors config //…
-
-2
votes1
answer86
viewsUpload React-Native image with Xios and Multer, backend with nodejs
I need to upload an image pro backend and save it, but the api function does nothing Function calling the Axios const teste = () =>{ console.log(picture) Axios.post(apiPath+'/api/addPostagem',…
-
-2
votes1
answer28
viewsUpdate array without having to wait for another user to log in
I am chatting with Node.js and socket.io, I have an error in listing the values of an array, the array of users. I put a <ul></ul> with an id and nothing else. follow the prints below…
-
-2
votes0
answers11
viewsDeploy (buildind) -- Node/Vue error
I hereby request support from you regarding a problem I am facing when trying to deploy a Vue.js application. I have the same problem making the attempt on Heroku and Vercel. 'npm run serves' -…
-
-2
votes0
answers30
viewsExport data to Backend Nodejs
I am doing a project on Nodejs and using EJS as engine and came across a problem when trying to use export to send data from my frontend to my backend. When I take the export line, my formScript…
-
-2
votes0
answers22
viewsAutomatic image update for instagram and facebook with Puppeteer, anyone help?
HTML code: <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="UTF-8"> <title>AutoPublic</title> <script> function getText() {…
-
-2
votes0
answers14
viewsMark Check Box in an EJS dynamically through JS
I need to format a JS on EJS so it dynamically marks a check box with the data coming from Nodejs. This is the EJS with the code that is not working: <div class="form-group row"> <label…
-
-2
votes0
answers32
viewsSend Email as type "meeting"
I need to send email automatically. I can do this already using the nodemailer. But, I need this email to go as Invite (Meeting). Because, when the person clicks "Yes", it will save the reminder in…
-
-2
votes0
answers8
viewsQ: Docker does not find the application directory
Before describing the problem I would like to inform you that I am new in the field of programming and am learning how to use Docker now, so I ask for everyone’s understanding. I’m spinning a…
-
-2
votes1
answer13
viewsSequelize returns error during api test
Good afternoon friends! I created a Rest api based on a youtube video using Node, express and sequelize. When sending an empty post, for one of the routes without access to the bank, I get return…
-
-2
votes0
answers8
viewsHow to pick up service object and send to another
I have the following problem. I’m working with nestJs and mongodb I need to store the data of an object, which arrives through an http POST, in two different Clicks from mongoDB. I’ve tested it…
-
-3
votes2
answers778
viewsNode.js, Ror or PHP?
Guys so far I only studied front-end, but I want now I want to make a complete application and for that I need knowledge to program the server. I see several options of languages and frameworks and…
-
-3
votes2
answers376
viewsHow to request a page in Nodejs?
I would like to know how to request a page using Nodejs. Basically, I need to make a request to a webservice that provides data of places based on the reported cep and from the answer given (which…
-
-3
votes2
answers596
viewsHow to use a dynamic url in angular projects 6
I now need to send my project, created in Angular 6, to Homolog. I have a file called app.constants and inside a class called Configuration. In this class I "failed" the API url for my tests, like:…
-
-3
votes2
answers90
viewsUsing . map() Create a variable that contains all user ages: [23, 15, 30]
What was requested: Using . map() Create a variable that contains all user ages: [23, 15, 30]. I created the code but the return I have is Undefined and I don’t know where is error. const usuarios =…