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
votes0
answers632
viewsNPM Package Installation Problems
I was installing the dependency Electron-Builder, but I cannot complete the installation. Whenever I try to run the command to install this dependency, nodejs returns me this error: I am running the…
-
0
votes0
answers75
viewsError Installing Dependencies in NODE Project
I’m having trouble with an Ode application. When I try to install packages, dependencies generate an error when I try to install express. follows the error: npm ERR! Unexpected end of JSON input npm…
node.jsasked 6 years, 6 months ago Esley Silva Marzin 1 -
0
votes1
answer92
viewsError in Ionic-lab
I’m making an app, however when I run Ionic serves -l or having access to Ionic-lab by the browser it displays an error message and for the server, I’ve searched a lot over the internet and found no…
-
0
votes1
answer382
viewsHow do I keep my Angular application running permanently?
To keep the Nodejs server running permanently on the computer is the following procedure; $ npm install forever $ forever start server.js However, how do I make my Angular application run…
-
0
votes2
answers703
viewsProblem with the pdfMake?
I’m using the pdfMake library for generating billets, and it was working fine, until I went to follow some examples of the documentation on website and returned me an error, I searched the solution…
-
0
votes1
answer37
viewsIs it possible to fire a file inside a server through a web page?
I wonder if it is possible to run a command inside a server through a web page, what I need is that through this page I can open a VBS script that I have saved or even open an application. No matter…
-
0
votes1
answer176
viewsIs there any way to connect a direct Node.js project to a domain?
Good my problem is because I have an open site at door 80 and a project made in open Node at door 8080. I own the domain:https://erkonow.com, when trying to access it only directs all subdomains to…
-
0
votes0
answers83
viewsHow to assign the result of Connection.query to a global variable?
I’m learning to use the module mysql and I came across a situation of not being able to assign the result to a global variable, follow my code: let data = 0 connection.query(query, (err, rows,…
-
0
votes1
answer54
viewsUL with Checkbox Angularjs Problems
I’m trying to create a Checkbox tree but I’m having problems with my directive when passing the model. Follows code: <ul class="main-level"><li> <mdi-input-checkbox mdi-reverse="true"…
-
0
votes1
answer125
viewsCombobox brings only one Mysql table result (Nodejs + Javascript)
I am able to bring in the combobox only one value that is in the mysql table, I need to list the two items in the same combobox. It is appearing one in a combobox and the other just below. <div…
-
0
votes1
answer42
viewsEletron overlay other screens
Guys I have an application developed in "Eletron" would like to know if it is possible to superimpose another application when in the background. Ex. Every time the application receives an order,…
node.jsasked 6 years, 5 months ago Victor César 149 -
0
votes1
answer69
viewsIn Javascript, how to access data from an array using PUG/Jade view?
I’m using Express in Nodejs and I also use PUG (or old Jade) in views. In a view I display the data taken from a database on a graph. I already receive the data in array format. I created a small…
-
0
votes3
answers1314
viewsaccess a json object as if it were an array
I need to access a json object as if it were an array, Example I have the following object on the client side: ´ remessa : function (){ var arr2 = [{ 'NrSequenciaDoc' : '7777', 'TipoOcorrencia' :…
-
0
votes1
answer476
viewsHow to remove Node in Arch linux / Linux Manjaro
I recently started a project but my Ode has a small error and I need to remove it. The following question is how to completely remove Node.js using the Arch-linux terminal ? And when executing the…
-
0
votes1
answer2831
viewsbreak line Node.js using Fs
I need to print the variable result with line break in a txt file, I have the following code : var Resultado = formatters.addTrailingZeros(req.query.Nrbanco, 3) + '0000' + '0' +…
node.jsasked 7 years, 2 months ago Elisangela Carla DE Souza 318 -
0
votes2
answers100
viewsHow to search for a particular package by npm?
I started a project in React and want to know how I search for a certain package installed directly by npm ?
-
0
votes2
answers50
viewsRuby Application Hosting with Sinatra
I’m starting my Ruby studies with DSL Sinatra. For this I installed Node.js then ruby with Sinatra. My applications locally are working normally. However, I would like to make them available for web…
-
0
votes2
answers979
viewsRemove an object within a mongodb array
I have the following document inside a Collection in mongodb: { "_id" : ObjectId("5988efbb742568478c6a086f"), "cliente" : "[email protected]", "lista_compras" : [ { "id_produto" :…
-
0
votes1
answer40
viewsManipulate data. js with angular-cli
Hello! I am now starting to mess with angular and I have a server.js file that makes a call in the database and back the data. I need an interface to display this data. My question is: how do I…
-
0
votes1
answer517
viewsHow is a Nodejs application distributed to customers?
I’m taking a look at Nodejs and a question has arisen about its distribution. Assuming I have a company, and I use Express/Nodejs to create a simple REST service for my main application. To install…
-
0
votes1
answer129
viewsNodemon loads index from directory but does not open index
I have a problem using Nodemon, whenever I start or restart the server for it instead of printing something on the console or load a page it is only in the directory Index. It takes several minutes…
-
0
votes1
answer1485
viewsHow important is . env in React?
I am developing a website in React and I came across the file . env and it contains the following script NODE_PATH=./src What would be your importance in React ? Because my server only worked when I…
-
0
votes1
answer524
viewsSynchronous function to check files in Nodejs?
I am creating PDF’s on my Nodejs server using the Express framework and the Pdfmake library. If anyone looks at my profile they will see that I asked a question about corrupted PDF after…
-
0
votes1
answer40
viewsError to use mongodb filter
I have an error trying to run a filter in the database. var params = '{"cd_entidade":"'+ vcd_entidade+'"}'; Movmaterial.find(params).toArray(function(err,docs){ if (err) throw err;…
-
0
votes2
answers3010
viewsMongodb connection with nodejs
How do I connect to the Mongo database with nodejs? I’ve looked at several sites but I’m not getting it right! I thank those who help!
-
0
votes1
answer350
viewsI want to put "" in my JSON numbers
I have a script in node.js who catches the json from a website that comes in this format: {"nome123":123.4,"nome213":231.4."nome123":123.4} I want to quote the numbers and leave it like this:…
-
0
votes1
answer44
viewsSelect using an array?
I have the following array: var arr = ['A', 'B', 'C'...]; And in my database I have the column categoria where values are saved in the following mode: 'A,B,C...', how could I make a SELECT picking…
-
0
votes1
answer284
viewsTypeerror: isPassword is not a Function
I’m having this error: Typeerror: isPassword is not a Function. I did a lot of web searches, found similarities, but I still can’t solve it. So another way I solved, but as I’m starting the studies…
node.jsasked 7 years, 1 month ago CÉSAR SANTOS 21 -
0
votes3
answers275
viewsNode App React Native Error
I am unable to create new project Whenever I run the command: React-Native init Myproject it cannot complete the creation of the project. Follow picture:…
-
0
votes0
answers373
viewsSlowness in Node ng serves when spending a certain time
I start my server with ngserve, with the passage of time the computer will be slow until it is unusable, I have to close the Node and open again, then goes for a while. Has anyone been through it?…
-
0
votes1
answer60
viewsHow to get a file stored with nodejs and multer?
In the API, in Nodejs, which I’m doing, the user sends the image to the API and, using multer, the image is stored. All the tutorials I saw for this situation, the Node is using a Preprocessor like…
-
0
votes1
answer93
viewsMongooose Middleware to encrypt password in Schema
I’m having a hard time putting a Middleware in my Mongoose schema. I put it as save and am getting the error that it is not a function when I call it. See below both codes: schema.pre('save',…
-
0
votes1
answer338
viewsIt is not possible to display line breaking strings in Node.js
I need to work with css in a js script for nodejs. However, if css has any line breaks the console.log does not work. const fs = require('fs'); var contents =…
node.jsasked 6 years, 2 months ago Marcus Vinicius Tavares 11 -
0
votes1
answer51
viewsNode.js for forwarding information from a third-party API
What I want to do with Node.js is basically LISTEN to an API (json) and process the results to send to multiple clients. Example: What I want to know is: This My VPS computer has to exist and run…
-
0
votes1
answer129
viewsHow to turn email object into Stream, Buffer or String?
I’m making an email application and my server is being made in Hapijs, and I’m having trouble taking the email and turning it into a String, Buffer or Stream. I want to turn to these formats because…
-
0
votes0
answers79
viewsHow to use save on Node js?
I’m with a study project using Node JS with Mongodb and I’m having difficulty saving a record in the database, I’m using the method this way. function postRestaurant (req, res) { var restaurants =…
-
0
votes0
answers44
viewsrequire Nodejs (NW.js)
Then I would like to know the following, if I work with Node js to create websites I can create example: a file CONEXAO.js and then give the require of it in another file to use it, until then all…
-
0
votes1
answer29
viewsLamda functions - How do I loop AWS-Stepfunctions - with Nodejs?
I have a function lambda, F1, in Nodejs whose main objective is to read the contents of a file that is deposited in S3 through another process. Let’s say in this file there are 10 products. I need…
-
0
votes1
answer78
viewsNPM - save x save-Exact x shrinkwrap
I am in doubt between the commands below, when to use them and what is the difference between them? What is the importance of --save-Exact, exactly? When and how to use each? npm i my-pack --save…
-
0
votes0
answers95
viewsNode-RED Dashboard - Update switch dynamically
I am creating an IOT Dashboard to control some electronics in my home. I am using Nodered and Dashboard. One question I have: my interface has several Switch type buttons that already work normally.…
node.jsasked 6 years, 1 month ago Rodrigo Macena 1 -
0
votes1
answer176
viewsConcatenation with Comma and Plus Sign
I am studying nodejs, and doing some tests with some native modules of Node I came across the following instruction. For free memory printing on computer: const os = require('os');…
-
0
votes1
answer667
viewsReturn value from a request!
I’m practicing some nodejs, so I decided to create an application for the temperature consultation, but I came across a question. How do I return the value of the variable "Weather": const tempo =…
-
0
votes1
answer611
viewsPassage of values between Express and EJS
I possess a value foo which is obtained in an asynchronous method in a file db.js. The query is being performed normally and I can already capture the variable data foo in my file index.js, but…
-
0
votes1
answer482
viewsDoes Npm run without Node installed?
Use here in the company a Linux Ubuntu, and installed the Vue-cli for npm version 3.5.2, installing the folder Node-modules usually with all the dependencies inside, but when I ran a node -v it…
-
0
votes1
answer180
viewsBring only firebase-specific data
Well, I’m trying to develop an app with Ionic 3 and Firebase. But I’m having problems. You are bringing all the orders, for all users (getAll). I wanted to know the correct way for me to bring only…
-
0
votes0
answers48
viewsData +upload Images doubling in nodejs!
I’m starting now with Nodejs, and I’m testing an example that saves data along with an upload of images. It’s working, but the image is duplicated. I wish I knew where the mistake was and why: var…
-
0
votes1
answer291
viewsNode.js - Aggregate returns object
I am doing locally the Node.js exercise as Mongodb proposed in https://www.w3schools.com/nodejs/nodejs_mongodb_join.asp There are two collections, Orders and product. After aggregation, the expected…
-
0
votes1
answer428
viewsProblem with toLocaleString in production nodejs!
Talk guys! I’m having trouble using toLocaleString in production! When using toLocaleString this way const number = (num / 100).toLocaleString('pt-BR', { style: 'currency', currency: 'BRL' }); in…
-
0
votes1
answer1411
viewsComment on files . env
Is there any way to write comments on file . env on projects in Nodejs?
-
0
votes1
answer234
viewsString for an array within a loop - javascript/nodejs
i want to pass the strings of a txt file to an array and as soon as each line was passed to the array the program would run it normally, then he would repeat and pick up the second string of the txt…