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
answer33
viewsError 500 when performing an authentication request with Adonisjs
I have a Sessioncontroller, which is the method that performs the user authentication process in the application. class SessionController { async store ({ request, response, auth }) { const data =…
-
0
votes1
answer385
viewsMongoose query returns an Empty Array
I’m studying Mongoose and I’m facing a problem. When trying to use find it just returns an empty vector while it should return all from Mongodb. Here is the code. var mongoose = require('mongoose');…
-
0
votes0
answers15
viewsError while using Raw from typeorm postgres
all right? I am having a problem in my application, I am using postgres with typeorm and when I try to use the find method with a Raw on Where, it presents the following error: "error": "column…
-
0
votes1
answer84
viewsGenerating PDF from a web page with Phantom
I am developing on Node an application where I have an html page, which I fill with database data and then need to save this page in PDF. I’m trying to use Phatom, I’ve tried following several…
-
0
votes1
answer1875
viewsMissingschemaerror: Schema hasn’t been Registered for model "Product"
Well, I’m following a tutorial on Node.js and Mongodb and I’m trying to create a product, so I create a list of attributes that objects will have, until everything ok. Following the video in…
-
0
votes0
answers78
viewsAccess-Allow-Control-Origin does not restrict access from other domains
I am creating an Api with Nodejs, where I set the application header to work properly Cross-Origin Resource Sharing. app.use(function (req, res, next) { res.header("Access-Control-Allow-Origin",…
-
0
votes1
answer67
viewsAngular problems - NPM
When I give an npm install on my project, it makes me that mistake : gyp ERR! configure error gyp ERR! stack Error: unable to get local issuer certificate gyp ERR! stack at…
-
0
votes0
answers16
viewsHow to get a response from an asynchronous call in JS?
Hi! I’m doing a query in a database. I need to display this query as soon as possible, and I am not knowing 'encapsulate' it with the await or whatever. The function is as follows: const…
-
0
votes1
answer3418
viewsRequest API with Javascript
I am making a web application in which the goal will be to use an API to only list some information (GET) and for this I would like to use only Java and html. The API is this:…
-
0
votes0
answers186
viewsHow to change the connection to the database using Sequelize+Mysql+Express depending on the parameter sent in the request?
For example, when receiving a request parameter equal to db1, in the precise controller that uses the db1 connection string When starting the Nodejs server the configuration made in the config.json…
-
0
votes0
answers68
viewsChange create.objectURL to Htmlmediaelement.srcObject
When adding the createObjectURL class, it is accusing the failed error in some browsers, after searching, I found that I can use Htmlmediaelement. But how can I include you in my project? export…
-
0
votes1
answer20
viewsError sending mongodb information on Node
Hello guys I’m having the following problem, my Node is accusing error: ReferenceError: Cannot access 'user' before initialization I am working with Schema user record in the case below I show a…
-
0
votes1
answer30
viewsHow to pass a JSON to the Express front end
Hello! I was wondering if there’s any way I can get a JSON file to the Front End using Express... I’m using this method: app.use(express.static(__dirname + '/public')); app.get("/", (req, res) =>…
-
0
votes0
answers56
viewsTwo Forms sending data to an API on Node
I am developing an application with Node and Mongoose. My problem is this: In the back end I have the model of an entity called Equipment. Schema has several parameters. I have a form to create an…
-
0
votes1
answer25
viewsSend CSRF Token Laravel by Node.js - CSRF Token Mismatch Error
Good night! I have an API that was developed in Laravel, and when I am consuming it in NODE.JS with Axios and is returning the CSRF Mismatch Token error So I believe I need to send the Token through…
-
0
votes1
answer223
viewsGenetic Algorithm Optimization - Node.Js
I’m transcribing a Java genetics algorithm for Javascript (Node.Js), but I’m having memory and optimization problems. Context of the problem: it’s an algorithm that the company I work for is trying…
-
0
votes2
answers288
viewsGet instance of connection
I would like to get the dbConnection.js file connection, but run the query in another file (DAO). I am taking a Nodejs course and what I have learned is to get this connection and use a 'managed'…
-
0
votes1
answer608
viewsTypeerror: this. _Connection.open is not a Function
I am doing activity to learn about Nodejs and Mongodb, and during the project, I have the error below: TypeError: this._connection.open is not a function As I am still in the learning phase, I could…
-
0
votes0
answers13
viewsSQLITE3 installation via NPM finds 3 vulnerability
Good afternoon guys. I am trying to install sqlite3 with npm, and at the end of the installation it is reported that it had 3 vulnerabilities. I’ve done some research and I’d like to understand…
-
0
votes1
answer324
viewsHow to write RTSP stream
I’m using the package node-rtsp-stream more Websocket to do the transmission of my IP-Camera, and the preview goes well, now I would like to know how to record this transmission and I have no idea…
-
0
votes1
answer22
views"Typeerror: Crud.Select_products is not a Function", I’m getting this error when trying to access a method from an exported class in Nodejs
File server.js var express = require('express'); var Crud = require('./database/Crud'); var app = express(); app.get('/api/home', function(req, res){ let results = Crud.Select_products();…
-
0
votes1
answer223
viewsInsert object data by API into Database
I receive an object with the front data, and in the api ta so the middleware: let no = require('../controllers/InsertNo') let insertNo = (req, res, next) => { dados = [] dados = req.body || ''…
-
0
votes1
answer161
viewsThe server does not return any response when accessing the route
[SOLUTION] It was necessary for me to configure the Postman Authorization tab and select the Type Bearer Token option and pass the token When trying to access a route in my API using the POST method…
-
0
votes1
answer80
viewsError while logging in with React using Fetch
I am building a software that has a Node API and a client in React. The backend is configured and working. You are logging in and when logged in bring back the data you need. However, with my React…
-
0
votes0
answers21
viewsProxyapi Nodejs (Upload of files)
Good afternoon, I am creating a Proxy for an application. What is intended is to centralize a set of API’s and forward requests. I’m doing a basic example in nodejs. Where I have 2 servers: Server 1…
-
0
votes1
answer2032
viewsHow to generate a build (production) of an angular project?
I’m trying to generate the build of an Angular project, but every time I turn the command to it ng build is presented me several errors, but searching I could not solve, someone would have a light?…
-
0
votes1
answer108
viewsAudio streaming server with files in S3 Bucket
I’m developing a web service on Node Js to be consumed by a streaming app. My audio files are hosted on AWS S3 Bucket. So far so good, I can play the songs in the app. But the big problem is the…
-
0
votes0
answers343
viewsProblem installing "@material-ui/core" package in my "create-React-app" application
I’m getting an error when I try to install the package @material-ui/core 3.9.0 in my application. When I execute yarn add @material-ui/core get the following return yarn add v1.12.3 [1/4] Resolving…
-
0
votes0
answers688
viewsError: EACCES: permission denied
My environment is Ubuntu and I’m having trouble accessing files that are inside a folder that is subfolder of my project folder. Here’s the code: const httpsOptions = { cert:…
-
0
votes2
answers102
viewsHow to manipulate Mongodb out of the configuration file?
I am studying Nodejs and Mongodb, I can even make the connection and some tests in the bank, but I would like to be able to export the connection with the bank to be able to do…
-
0
votes0
answers18
viewsHow to access a query return
I’m trying to add values using push, turns out it’s not working... Only works inside the code block connection.query(). Is there any way to access variables and add values to them outside this…
-
0
votes0
answers22
viewsI am trying to run a route on Node and the error appears below:
I’m trying to create a website with routes, using Mysql and Node.js But when I will run.. appears the following msg: follows the error msg: Emitted 'error' event on Server instance at: at…
-
0
votes0
answers14
viewsDOCUMENT VERIFICATION ON ANOTHER WEBSITE
Hello! I would like to do an integration to check a CNPJ. On my site, the user would have to put their CPNJ, UF, entity name, city and purpose. And, for confirmation purposes, I would have to do a…
-
0
votes0
answers8
viewsError in hosting JS bot NODE using Venom-bot
I made a bot for Whatsapp using Venom, but at the time of executing the bot on Heroku, it gives the following error Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60…
-
0
votes0
answers16
viewsRead aquives in CSV in JS and put in a variable
How can I read a CSV file and place these lines within a variable ? pq dps I will generate Graphics in a web application with this data
-
0
votes0
answers2
viewsexpress nodejs send several files via send file
as I send 2 files to the site by sendFile , I’ve been trying to do this all day and trying to find a post that helps me and found nothing //ms.pipe(requisicao, resposta,[__dirname +…
-
0
votes0
answers190
viewsECONNRESET with postgres and sequelize in nodejs
Good we are using nodejs v10.13.0 together with him the sequelize 4.42.0 to communicate with our bank postgres 9.2, our server is in AZURE it has 8GB of HAM, 2 CPU and is Centos 7. In the bank we…
-
0
votes0
answers119
viewsSession does not persist using express-Session and Passport.js
When logging in, my user is redirected to another router, only the session is not saved: router.post('/login', passport.authenticate('delegados', { failureRedirect: '/login', failureFlash: true }),…
-
0
votes1
answer260
viewsHow to access attributes of an object coming from a request with Node
I have a request that returns the following: object { responseHeader: { status: 0, QTime: 0, response: { numFound: 22, start: 0, docs: [ [Object], [Object], [Object], [Object], [Object], [Object],…
-
0
votes2
answers61
viewsNodejs, Connection log
I have a problem to create a LOG database of connections, I can get virtually all the data, but the most essential that would be the body of Response, is returning with undefined, someone would know…
node.jsasked 5 years, 8 months ago user138549 1 -
0
votes0
answers69
viewsStart Node application on Linux boot (Raspberry)
Good afternoon to all, I have a JS application that needs to be started on Linux boot, how could I start this application? I tried with systemd, but it didn’t work. Could you give me some link or…
-
0
votes1
answer36
viewsHow to make a scraping changing page
I need to create a bot that enters the home page of a particular site, take all the link’s of the posts, enter a, capture a div that contains the video and move on to the next link captured on the…
-
0
votes2
answers1371
viewsHow to receive express headers sent by Xios in React.js
My front sends requests with Axios to Node express API this way: class ServiceRequest { constructor() { this.api = axios.create({ baseURL: URL_BASE, timeout: 1000, headers: { 'Content-Type':…
-
0
votes0
answers70
viewsWhy isn’t Mongodb saving the data with default values declared in his schema?
Greetings dev’s, I declared the schema as follows: const mongoose = require('mongoose') const TweetSchema = new mongoose.Schema({ author: String, content: String, likes: { type: Number, default: 0…
-
0
votes1
answer88
viewsPrefix in Node restify
I have my module in the nodejs and I would like to have a prefix so I don’t have to repeat every time the beginning: For example, in the file route js const db = require('../services') const routes…
-
0
votes0
answers278
viewsNodejs Express Sessions problem: all information is being exchanged
I need help fast ... I’m wondering why my web application (Nodejs 10.x) is giving this strange error: It’s swapping out user sessions... When a user edits their profile, the information always goes…
-
0
votes0
answers77
viewsproblem to update data at angular
the problem is following when I will update the data of a client I have to enter again all the data but the data that is not used will be null I’m using the angular nodejs and mongodb the code is…
-
0
votes0
answers66
viewsProcess in Ode being terminated alone
I am using blinktrade’s Ode documentation to receive deposit notifications on Bitcoins, but the Polling process is being terminated by itself thus disrupting the functioning of my system, how can I…
-
0
votes1
answer119
viewsEncoding Node/Postegres SQL_ASCII
I have an API on Node that connects to a Postgresql database using the "pg" module, where the database in question uses the "SQL_ASCII" encoding. I do not have the option to change the encoding of…
-
0
votes1
answer63
viewsHow do I modify a local scope variable within a function?
Basically I want the function below to return a Boolean so I know if the transaction has occurred successfully or not : public persistirPagamento = async (agencia: string, banco: string, conta:…