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
-
-1
votes1
answer88
viewsHow to find a word in this query params?
I’m doing a query that performs where based on the string filter received in query params. My filter query params has this format: filter: (status~contains~false~and~username~contains~'admin') I…
-
-1
votes1
answer372
viewsPost request going without angular body
I’m having trouble with ionic 4 and angular to make a request post in case I am implementing the login, but is not being sent my body in the request. My files are like this: Baserequest. public…
-
-1
votes2
answers264
viewsAdonis (nodejs) Migration mysql error: 1045
Experiencing an error mysql reports when running a migration with Adonis (I’m starting in the nodejs world). The application runs smoothly on my machine, when passing it to the server that in the…
node.jsasked 4 years, 7 months ago Raul Castro 17 -
-1
votes1
answer79
viewsArray being rewritten completely within foreach
I’m running a voting system through the firestore, and I’m having a problem regarding the behavior of an array within the foreach, follow the code: busca_votos: function(pergunta){ let path =…
-
-1
votes1
answer330
viewsHow to filter relationships in Donis?
I pass this query: const filter = request.input('filter') const queryBookQuestions = BookUnitQuestion .query() .with('book_unit') .with('user') .with('book', (builder) => { builder.where('id',…
-
-1
votes1
answer376
viewsHow to fix button at the bottom of a page without moving?
I have a page with navbar and with a div which contains a logo, a paragraph with text and then a button, all in the same div, each component below the other in the order referred to above. My…
-
-1
votes2
answers133
viewsHow I search properties within a td / tr using only js
Good afternoon guys, I need to search for data from within a site (scraping) that are within a table, with and . The information I need is within td’s. Follow the code: <table width="95%"…
javascript node.js javascript-events web-scraping scrapingasked 4 years, 7 months ago arthurgehrke 19 -
-1
votes1
answer420
viewsHow can I search between dates with nodejs and mongodb?
I would like to know how I can search between dates. Example: Bring all data between 06/12/2018 to 06/11/2019. Bring all data for a given year or month. How can I make these filters in my controller…
-
-1
votes1
answer57
viewsMysql to Sequelize
I would like to turn this code into Mysql SELECT pets.nome, pets.pulseira AS pets , localizacao.datahora, localizacao.latitude, localizacao.longitude AS localizacao FROM pets JOIN localizacao ON…
-
-1
votes1
answer96
viewsQuery sql nodejs loop
Hello I’m with a doubt I think they could help me, to some problem in running a function twice in the same script example have this function exports.getValueMsg = function(){ return new…
-
-1
votes1
answer1002
viewsHow to make a relationship with two items from the same table in Sequelize?
I have a table that holds two user Ids. The UserId and the ResponsibleId, both take from the table User. Model: module.exports = (sequelize, DataTypes) => { const Table = sequelize.define(…
-
-1
votes1
answer113
viewsSyntaxerror: Unexpected Identifier in /Users/apple/Documents/Nodejs/views/index.ejs while compiling ejs
I have a problem running my SQL. When I run on localhost, my code is normal. Follows code. const express = require('express'); const fileUpload = require('express-fileupload'); const bodyParser =…
-
-1
votes1
answer222
viewsProperty of my object is returning Undefined
I have the following function: async geraQuiz(idEstudante) { let idioma = new Array() let livrosUnidadesGerarQuiz = new Array() const idsClassesEstudante = await…
-
-1
votes1
answer56
viewsHow can I write to a server file using Node FS?
The command is running on my server machine: $ http-server . -p 3333 Everything perfect when accessing from a web browser to another machine (also Linux). But when running this script on Node, I…
-
-1
votes1
answer89
viewsNodejs + mssql how to do a search sequence
I’m starting with nodejs and I came across a problem that I’ve been a few days resisting not posting here, but it seems I don’t have enough knowledge and I can’t find material when searching for…
-
-1
votes3
answers534
viewsUsing Dashboard Bootstrap Theme with React js
Good afternoon Personal, I’m new to React js and would like to know how I could use a Dashboard bootstrap theme that uses local Imports of css and js files located in the "Assets" folder of the…
-
-1
votes1
answer684
viewsQuery with conditions using Mongodb Irrigation + nodejs
I have a code that returns me arrays with the parameters I need to feed my HTML page, however, I need to include some conditions in this search so that it only takes the values after a certain date.…
-
-1
votes1
answer480
viewsJs file import error (Node)
I’m starting to learn a few things about Ode and for that I’m creating a chatbot using Blip. But I want to do this with an external js by making the connection. However I am having a problem trying…
-
-1
votes1
answer370
viewsHow to leave values already filled in the input (VUE Js)
I’m doing a simple CRUD, with Vue, Node, Mariadb. In the update part, I don’t know how to take the user values and leave already filled. (I’m beginner) <div> <p>Nome</p> <input…
-
-1
votes1
answer223
viewsHow to create a search box with Nodejs and Mongodb?
I am trying to create a search with mongodb using "like" according to this site this site https://bognarjunior.wordpress.com/2015/05/18/consultas-avancadas-com-mongodb/ var results = await…
-
-1
votes1
answer91
viewsGroup array with javascript
I have a backend application in Node that returns the following array: let res= [ { codigo: '0341', codigo_1: '0320', visao: '14', total: 24, data: '201502' }, { codigo:'0341', codigo_1:'0320',…
-
-1
votes1
answer23
viewserror in authentication
Cannot read property 'username' of null Keeps giving this error I don’t know why, he can create a new user but can’t login, someone knows what is happening? app.post('/users', async (req, res) =>…
-
-1
votes1
answer645
viewsHow to resolve Error: Cannot find module 'C: wamp64 www sqlnode index.js'
When I try to run my server in Ode, this error message is displayed, I checked the models and paths of the files I am including and apparently everything is right. So is my index.js file: const…
-
-1
votes1
answer24
viewsPage loads without query finish - Nodejs + Mysql
I need the page to render only when the query returns some value, I tried to use Promise, async, await... but nothing seems to work, the page always renders and then the data is retrieved.…
-
-1
votes1
answer35
viewsProblems with Promisse: Promisse[Object]
I’m developing an application and I’m doing database queries with a predefined model, I’m trying to use an asynchronous function to store the value of this query in a variable. Below follows the…
-
-1
votes1
answer123
viewsQuery mysql on Node-JS Not Working
I am developing a Node application in which I need to do some query’s in mysql, however a simple query of select is not working. follows the code of the passage function processTag(tagNumber,…
-
-1
votes1
answer27
viewsDownload a Jira image with nodejs using authorization
Good afternoon, I need to download a profile image of Jira via REST. I can, but jira sends me an image referencing that I don’t have permission to see it (example of how the image is downloaded:…
-
-1
votes1
answer475
viewsSequelize Create method does not insert an object field
I am making an application with Sequelize, and when I run the model.create({obj}) function, one of the fields is not inserted in the database. The field in question is a Foreign key from another…
-
-1
votes1
answer143
viewsGraphql: I cannot stop the Node execution and return the Error (Business Error)
I’m trying to create some queries and mutations, on Node with Graphql. I’ve tried how to solve the problem and I can’t find a solution. I wonder if someone could help me? In the project I put the…
-
-1
votes1
answer66
viewsConvert JSON from graphql API to array
I have a research connection to a API graphql, this search returns a JSON, where I store it in content and then turn it into an array, but this array is not showing the values contained in it, keeps…
-
-1
votes1
answer217
viewsTreat File as String in Nodejs
I am having the following problem : I wish to carry out the count of line breaks, ie the amount of '\n' in a file. For this, I wish while reading the file to treat it as a String. I am trying it as…
javascript node.js filing-cabinet fs newlineasked 4 years, 3 months ago Gabriel Ribeiro Carneiro 81 -
-1
votes1
answer112
viewsNode.js - problems with async/await in a setInterval()
I am developing a bot to monitor an application. The function areaDocenteMonitor.start() makes only one request and returns the status. If the status is different from 200 an email is triggered with…
-
-1
votes1
answer197
viewsApi headers error with nodejs
[nodemon] restarting due to changes... [nodemon] starting `node index.js` rodando na porta 3000, Ctrl+C para parar…
-
-1
votes1
answer96
viewsProblem with request post on a NODE.JS loop
I have a problem with my code and I couldn’t get out of it. What happens is that I make a request get ( that is working ) and I get the return of it that comes in JSON format, after that I do a for…
-
-1
votes1
answer2457
viewsBlocked cross-origin request - JS/CORS/AXIOS
I am using an API (Axios) to connect my application backend to frontend, however, I am not able to give POST (register a new record) on one of the pages because Mozilla Firefox blocks cross-origin…
-
-1
votes1
answer658
viewsHow do I show the error message sent by Express?
I have the following method in back-end, who logs in: const login = async (req, resp) => { try { if (!req.body.id) throw 'Necessário Informar ID'; const ongFromDB = await…
-
-1
votes1
answer93
viewsError deleting a BD widget from a column
I’m trying to create a Postings in Node. A post can be created, shown or deleted. For this I created a table called posts with the following fields : table.string('category').notNullable()…
-
-1
votes1
answer71
viewsam looking for help in redis.get cache on Node.js
function getCache(key) { cache.get(key, (err, value) => { if(err){ return ("err"); }else{ return ("" + value); } }); }; console.log(getCache('fatorial:7')); I’m trying to get key value saved in…
-
-1
votes1
answer38
viewsHow to Have Simultaneous Sessions?
Hello I created a basic CRUD Node server using Heroku and Mysql Postgres, the problem is that it only allows you to create a session, ie if you log into a devices all entering the site are logged in…
-
-1
votes1
answer218
viewsCan’t find the module
That mistake you’re making, I’m following a course and the teacher’s wheel, mine gives that mistake! C:\Program Files\nodejs\node.exe --inspect-brk=34110 build\server.js Debugger listening on…
-
-1
votes1
answer78
viewsEngine EJS + Javascript, sharing variables
const express = require('express'); const bodyparser = require('body-parser'); const redis = require('redis'); const fatorialFuncao = require('./fatorial'); const PORT = process.env.PORT || 8080;…
-
-1
votes1
answer233
viewsError using create in sequelize
Good evening. I just started studying Node.js and am having trouble using . create in Sequelize. The error happens when I try to register a user: routes.get('/', async (req, res) => { const user…
-
-1
votes1
answer184
viewsHow to handle Node error response in React
Guys I started Act and recently I looked for various ways to treat the error but I do not understand why it does not work. I tested the Node in the isomnia and it’s all ok, in React I get the answer…
-
-1
votes1
answer44
viewsLocal server Node.js does not find html file
I’m a beginner in the forum (in Node.js and html as well) so any errors warn. I wanted to make a local server with Node.js (server.js), code below: This code should show the contents of the…
-
-1
votes1
answer59
viewsSelects with client-side nodejs+mysql
I’m new to nodejs, I’ve always used php with mysql and I’m migrating to Node but I have some problems, make the Node connect in the database works perfectly however I get no success when trying to…
-
-1
votes1
answer82
viewsShow button only from a specific <li> button
I am developing a web application where this green confirm button shown in the image, is only displayed when the blue edit button is clicked. These "cards" are li’s that are generated dynamically as…
-
-1
votes1
answer35
viewsI need help, I am using Node and Request Form to do Scraping
I’m trying to develop an application to take data from a particular site and send it to the database. It would be simple if you didn’t have to request to access this data. As I’m beginning, I may be…
-
-1
votes1
answer229
viewsUse more than one function in the Get Method route with Node.js
Good evening, I’m starting to learn about Ode and React.js and I’m having a problem because I need to use more than one function on the same route and by get method. I did the code below, it’s…
-
-1
votes2
answers310
viewsCurl request using nodejs returns an empty body
I used the Curl of the post office site to turn into a nodejs request (I used this site to convert Curl into js code-> https://curl.trillworks.com/) var request = require('request'); var headers…
-
-1
votes1
answer175
viewsRun code Node by pressing a button in html
Good morning gentlemen, I am beginner in Node and Javascript in general, I am using express.js and I want to press the button "SEND" it runs a code (that serves to send an email): The code Node I…