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
answer178
viewsError listing posts with Node.js and sequelize
Every time I open the route "/" says finAll is not a function, what is wrong? const express = require('express') const app = express() const handlebars = require('express-handlebars') const…
-
0
votes2
answers150
viewsI can’t create a Schema in Mongoose
Hello! I am learning to use Mongoose. I am trying to create a model, but the terminal is returning the following error: "Cannot read Property 'Schema' of Undefined" Where I’m going wrong? Follow the…
-
0
votes1
answer115
viewsProblem Bringing Database Data to html
hello people I am doing a school project and would like a help in this part, here should happen the following, when the customer select the attendant in select Service should be listed the services…
-
0
votes1
answer608
viewsJest integration test - Nodejs API + Mongo
I would like a help in my tests, because I am doing something wrong because there is time that my test passes and soon after it does not pass more. Below are some of the two tests I have of my study…
-
0
votes1
answer54
viewsSearch and add table data in form [Nodejs and Mongodb]
I’m trying to load data from 3 tables into a form from routa, but it only takes the data from Municipality in the select of Country. It is supposed to have 3 selects (Country; Country; Municipality)…
-
0
votes1
answer722
viewsUpdate Ode.js in Ubuntu
I’m not able to update Node.js in Ubuntu. I did the installation, but it appears that the version was installed: Node = V8.10.0 Npm = v5.3.2 On the site it says that the latest version is 10.16, why…
-
0
votes1
answer113
viewssequelize problem with relays
Hello, I have some tables in mysql, I created the models using sequelize-auto and associations manually. The problem is that when I try to include these relationships I come across the error…
-
0
votes0
answers190
viewsParse error while uploading images from Xios
I’m trying to send images via POST method in Xios, but when I run the script, it gives me this error: error: { code: 500, error_id: 'server_error', description: 'Error parsing request into form…
-
0
votes1
answer318
viewsDisconnect users or authenticate them again if the server is restarted - Angular 2
I have an Angular 2 application that is consuming an API in Nodejs. This application has JWT authentication. My problem is this: When the Node server is restarted, the user is still able to navigate…
-
0
votes1
answer77
viewsContext of the this property in Typescript + Node
I have an XPTO class with the methods below, in the login method I try to call the answer treatment method, however, the this is Undefined in the context of the function, as far as I could…
-
0
votes1
answer686
viewsInsert value in the Mongoose array
My model works as follows. A user has documents, but the user registers before they have these documents. What I’m basically trying to do is to update users in the document array. SCHEMA 'user…
-
0
votes1
answer158
viewsJavascript function is not replacing window.location.pathname
I created a function for simple search, according to the code below function pesquisar(){ var pesquisa = document.getElementById('pesquisa').value window.location.pathname = 'produtos'…
-
0
votes1
answer67
viewsMongo Query is not working when I have a compound property (one inside the other)
I am trying to perform a query in the database of Mongo, when I have a simple property as for example: Nome: João Works smoothly But if I have a compound property as an example: Tamanho: { PP: 2 M:…
-
0
votes0
answers78
viewsHow to access my backend API
I need to access my Node backend API to send emails with information from a contact form. I hosted my app on King Host and it appears this way the point is, since I’m a bit new to Node, I don’t know…
-
0
votes1
answer29
viewsUpdate a user’s schema
Hello! Recently in Discord I made a system of clans, using mongodb atlas, to learn how it works. The problem is that it creates the schema in the right atlas, but gives the update in the user…
-
0
votes1
answer945
viewsError in npm run dev
I’m trying to execute command npm run dev in a project developed by another person. This is the configuration in package.json: "scripts": { "dev": "npm run development", "development": "cross-env…
-
0
votes0
answers552
viewsCross-Origin Request works on Postman, but not on frontend
I need to access my API for sending emails, but every time I try to do it through my application’s frontend I get a CORS error saying Cross-Origin Request Blocked: The Same Origin Policy disallows…
-
0
votes1
answer46
viewsHow to work properly with the request?
I need to send a simple notification using onesignal, but is giving error in the build of the web app because of https import, as the code I am importing as follows: var https = require('https');…
-
0
votes0
answers338
viewscreate-React-app returning error 'Cannot find module 'React-scripts/scripts/init.js' '
When I try to create the React project with both npm and Yarn (create-React-app test), it returns the following error: internal/modules/cjs/loader.js:638 throw err; ^ Error: Cannot find module…
-
0
votes1
answer198
viewsRemove Columns from a . csv file with Javascript
Below follows my code for reading a file. csv using Nodejs, I would like to know how I can remove the "COMPANY" and "%" columns from the file 'file.csv', thanks in advance to those who contribute.…
-
0
votes1
answer28
viewsCompare 2 arrays with some() or Every()
I am trying to do an exercise that compares whether the array of objects inserted in a function has any element equal to the following array: const gooUsers = [ {id: 1}, {id: 2}, {id: 3} ]; The…
-
0
votes0
answers76
viewssetTimeout within setInterval
There is a way to do this on Node.js? setInterval (every 5 seconds) Some functions (about 3 - 4 seconds) setTimeout (3 seconds) End So every 5 seconds run a function I don’t know how long it will…
-
0
votes2
answers47
viewsFind sequence in integer value
I came to the following algorithm to return true if there is an incremental numeric sequence pattern +1 function sequenceSearch(vector) { let pos = 0; let found = 0; for (pos = 0; pos <=…
-
0
votes0
answers61
viewsUse of the Xmlhttprequest object to perform an asynchronous HTTP request to update data on the server without a complete web page update
I have basic knowledge and am using in the application: html/css, javascript, Nodejs, and for the database - Mongodb - Mongoose. My application is very simple, as you can see in the image below,…
-
0
votes2
answers150
viewsv-form post does not send data
I created a basic form to see if I receive data in my API using vuetify but when giving Ubmit the v-select data is not sent and I cannot understand the reason, since in general the examples of these…
-
0
votes1
answer327
viewsSelect HASH Code SHA256 Nodejs
How do I select the code for HASH in Nodejs? I have a system made in another language with passwords encrypted with SHA256 The encryption function there is so: #define HASH_CODE =…
-
0
votes1
answer499
viewsUpload an array of images with Node.js, Multer and Sharp
In addition to uploading the images I do a treatment on them with Sharp, uploading only 1 image with upload.single('image') the treatment is executed and the image is saved, but when I try an array…
-
0
votes1
answer101
viewsAllow https source access
I developed a Node api using restify only for real-time warnings, but came across a https problem: If the origin of the request comes from an https site the api does not work My Cors on the Node is…
-
0
votes1
answer390
viewsSequelize-auto to the SQL Server database on Node JS
I’m looking to migrate the tables from an existing SQL Server database on Node JS. I made the connection to the bank and it returns me connected. I then run the following command to migrate the…
-
0
votes1
answer31
viewsProblem to Insert Data in BD
I created a form that inserted information in Mysql using Nodejs, but it is not inserting anything and not any error in the console and none in the terminal, follows below the code admin.js…
-
0
votes2
answers991
viewscheck if the email already exists
I created this function to check if an email already exists in DB let errors = []; function ValidationContract() { errors = []; } // verifica a validade do email e se o mesmo ja existe no banco…
-
0
votes1
answer1434
viewsTypeerror: expressValidator is not a Function
I’m having trouble solving the issue below where the message appears "Typeerror: expressValidator is not a Function" var express = require('express'); var consign = require('consign'); var…
node.jsasked 5 years, 2 months ago Bruno Ferreira 129 -
0
votes1
answer459
viewsHow to group data into an array, making a single object | MONGO + NODE
I would like to fetch user data along with their linked portfolios in an array, however, is bringing as two arrays. And inside each wallet has an array of "entrances" where you would like to bring…
-
0
votes1
answer256
viewsLoading dependency Graph, done. error: bundling failed: Referenceerror: Unknown helper objectSpread2 at loadHelper
I am developing an app in React On. However when generating buildo I get message: Loading dependency Graph, done. error: bundling failed: Referenceerror: Unknown helper objectSpread2 at loadHelper…
-
0
votes2
answers657
viewsRedirect page by passing header Authorization
I have a login application where the user type the username and password, then I make a POST request with ajax according to the code below: <script >…
-
0
votes1
answer55
viewsProblem in the Result
I am having problems both to present the error message and to insert the information in the BD module - express-Validator 1 - Error in saving information: Result { Formatter: [Function: Formatter],…
-
0
votes1
answer56
viewsPython Unsupported operand type pyppeteer
I’m trying to use pyppeteer (a port from Puppeteer to python, with basically the same syntax). When I try await page.mouse.click('.jfk-button-narrow', { 'button': 'left' }), the error arises File…
-
0
votes2
answers53
viewsLearning Javascript and Nodejs
Gentlemen, I’d like your help in understanding the workings of Promises and async/await. I am new to the language and with a lot of cost I understood how callbacks work. Someone could help me…
-
0
votes1
answer35
viewsProblem with Controllers
I’m having trouble implementing the MVC standard presenting the error below: Typeerror: application.app.controllers.admin.noticias_save is not a Function const { check, validationResult } =…
-
0
votes1
answer165
viewsProblem with read Property 'query' of Undefined
I’m having trouble getting the result of a query in Nodejs bd -Sqlserver module - mssql Error presented: Typeerror: Cannot read Property 'query' of Undefined At formulasdao.getFormulas (C: xampp…
-
0
votes0
answers81
viewsProblems searching for file via Google Drive api
I’m trying to return the file id from google drive based on the following example: Search for files and folders code : function searchFiles (auth) { const drive = google.drive({version: 'v3',…
-
0
votes1
answer973
viewsNode-Sass error while trying to install the dependencies of an Ionic 3 project
Hello I have a project done in Ionic 3.2.0, the project in question can be found in the following link https://github.com/Mathe13/rodoviasApp, I downloaded it from git, removed the node_module and…
-
0
votes0
answers168
viewsProblem to run select with sequelize
I’m having trouble executing a select in Nodejs where it takes quite long looking that the same stays in infinite loop. module - sequelizejs bd - SQL server dbConnection const Sequelize =…
-
0
votes1
answer395
viewsNODE.js with socket and Mysql
I have a problem with Node, I believe it must be something related to callback s, but I’m not sure, but anyway, my problem is basically in pulling data from a database Mysql, this data will be…
node.jsasked 5 years, 2 months ago Fabricio Carneiro 25 -
0
votes3
answers1663
viewsNodejs error: A partials dir must be a string or config Object
I am sending standardized emails using nodemailer with nodemailer-express-handlebars ,but whenever I am trying to send an email, I am receiving the Error: A partials dir must be a string or config…
-
0
votes2
answers336
viewsVariable scope problem in foreach loop - Nodejs
I’m trying to get back to the view ejs home/index the vector of objects objArray, but when exiting the foreach loop and doing all processing of the data I am receiving from the bank the objArray…
-
0
votes0
answers22
viewsIs it a scope problem?
I have a problem in obtaining the value of a variable in Nodejs. router.post('/admin/categorias/nova', (req, res) => { var erro = []; Categoria.findOne({ slug: req.body.slug }).then((categorias)…
-
0
votes1
answer242
viewsProblem in angular design
I went to try to install the socket.io-client in my project and ruined my system Is giving the following message: Unhandled Promise rejection Error: Zone.js has Detected that Zoneawarepromise…
-
0
votes1
answer42
viewsReturn list of files contained in a web page
I need to pass the link of a page to a program in js Node, and it returns me all the names of the files . bz2 that it contains in it. The page would be that of the image. It would be something like:…
-
0
votes1
answer97
viewsNodejs Duplicate data when using Request Api
hello, I’m new to nodejs! I’m developing a code that reads a table in postgresql and acts with the record runs some GET API. For example, returns "int" executes "http://api1/param", if returns "Fab"…
node.jsasked 5 years, 1 month ago Bruno Jardim 1