Trending questions in Node-js

0 votes
1 answer

How to get Node.JS Express to listen only on localhost?

Hello @kartik, This is a bug in hive-go that only ...READ MORE

Oct 16, 2020 in Node-js by Niroj
• 82,840 points
7,447 views
0 votes
1 answer

How to hide password in the nodejs console?

Hello @kartik, To hide your password input, you ...READ MORE

Nov 30, 2020 in Node-js by Niroj
• 82,840 points
5,180 views
0 votes
1 answer

Error:/usr/bin/env: node: No such file or directory

Hello @kartik, You have to manually link to ...READ MORE

Oct 12, 2020 in Node-js by Niroj
• 82,840 points
7,248 views
0 votes
1 answer

How to catch exception in node during JSON.parse?

Hello, JSON.parse runs synchronous and does not know anything ...READ MORE

Nov 27, 2020 in Node-js by Niroj
• 82,840 points
5,207 views
0 votes
1 answer

How can I get npm start at a different directory?

Hello @kartik, Try using: npm start --prefix path/to/your/app & inside ...READ MORE

Jul 14, 2020 in Node-js by Niroj
• 82,840 points
11,020 views
0 votes
1 answer

How to get data out of a Node.js http get request?

Hello @kartik, Your logs return undefined : you log before ...READ MORE

Oct 12, 2020 in Node-js by Niroj
• 82,840 points
7,054 views
0 votes
1 answer

How do I create a HTTP Client Request with a cookie?

Hello @kartik, The use of http.createClient is now deprecated. You ...READ MORE

Oct 16, 2020 in Node-js by Niroj
• 82,840 points
6,768 views
0 votes
1 answer

How do I send command line arguments to npm script?

Hello @kartik, The syntax is as follows: npm run ...READ MORE

Jul 8, 2020 in Node-js by Niroj
• 82,840 points
11,052 views
0 votes
1 answer

How can I use an http proxy with node.js http.Client?

Hello @kartik, You can use request, I just found ...READ MORE

Jul 17, 2020 in Node-js by Niroj
• 82,840 points
10,610 views
0 votes
1 answer

Error:Failed to parse json-This is not a bug in npm.

Hello @kartik, Try this: npm cache clean Hope it works!! Thank ...READ MORE

Nov 27, 2020 in Node-js by Niroj
• 82,840 points
4,822 views
0 votes
1 answer

Error:Missing file extension "ts" for "./lib/env" import/extensions

Hello @kartik, Add the following code to rules: "rules": { ...READ MORE

Oct 15, 2020 in Node-js by Niroj
• 82,840 points
6,637 views
0 votes
1 answer

How to end an express.js / node POST response?

Hello @kartik, You can use res.end and pass in a ...READ MORE

Nov 30, 2020 in Node-js by Niroj
• 82,840 points
4,564 views
0 votes
1 answer

ReferenceError: primordials is not defined in node

Hello @kartik, Use following commands and install node v11.15.0: npm ...READ MORE

Jul 12, 2020 in Node-js by Niroj
• 82,840 points
10,514 views
0 votes
1 answer

How to console.log to stdout on gulp events?

Hello @kartik, Use this: var gulp = require("gulp"); var util ...READ MORE

Oct 12, 2020 in Node-js by Niroj
• 82,840 points
6,532 views
0 votes
1 answer

How do I use HTML as the view engine in Express?

Hello @kartik, To make the render engine accept ...READ MORE

Jul 17, 2020 in Node-js by Niroj
• 82,840 points
10,185 views
0 votes
1 answer

How to disconnect from tcp socket in NodeJs?

Hello, Try this out: net.createConnection() returns a Socket object. client.destroy() is what ...READ MORE

Nov 30, 2020 in Node-js by Niroj
• 82,840 points
4,143 views
0 votes
1 answer

How to send JavaScript Object with Socket.io from server to client?

Hello @kartik, You actually need to emit an ...READ MORE

Nov 30, 2020 in Node-js by Niroj
• 82,840 points
3,847 views
0 votes
1 answer

Error:'bower' is not recognized as an internal or external command, operable program or batch file

Hello @kartik, Fixed it by adding the 'npm' ...READ MORE

Oct 14, 2020 in Node-js by Niroj
• 82,840 points
5,797 views
0 votes
1 answer

How to Install a local module using npm?

Hello @kartik, This is what worked for me: npm ...READ MORE

Jul 9, 2020 in Node-js by Niroj
• 82,840 points
9,930 views
0 votes
1 answer

How to Start another node application using node.js?

Hello @kartik, Use child_process.fork(). It is similar to spawn(), but ...READ MORE

Nov 30, 2020 in Node-js by Niroj
• 82,840 points
3,736 views
0 votes
1 answer

Error:Cannot find module 'xmlhttprequest'

Hello @kartik, XMLHttpRequest is a built-in object in web ...READ MORE

Sep 7, 2020 in Node-js by Niroj
• 82,840 points
7,273 views
0 votes
1 answer

Error: listen EACCES 0.0.0.0:80 OSx Node.js

Hello @kartik, Give root access to node and ...READ MORE

Oct 14, 2020 in Node-js by Niroj
• 82,840 points
5,677 views
0 votes
1 answer

How to get the npm global path prefix?

Hello @kartik, Try this: npm config get prefix will return ...READ MORE

Oct 15, 2020 in Node-js by Niroj
• 82,840 points
5,606 views
0 votes
1 answer

How to setup route for websocket server in express?

Hello @kartik, You'll want to use the path option: var wss ...READ MORE

Oct 16, 2020 in Node-js by Niroj
• 82,840 points
5,529 views
0 votes
1 answer

How to write a test which expects an Error to be thrown in Jasmine?

Hello @kartik, Try using an anonymous function instead: expect( ...READ MORE

Jul 13, 2020 in Node-js by Niroj
• 82,840 points
9,593 views
0 votes
1 answer

How to automatic run gulp tasks via npm?

Hello @kartik, Here is the code: var ...READ MORE

Nov 30, 2020 in Node-js by Niroj
• 82,840 points
3,150 views
0 votes
1 answer

How to include scripts located inside the node_modules folder?

Hello @kartik, I would use the path npm ...READ MORE

Jul 15, 2020 in Node-js by Niroj
• 82,840 points
8,946 views
0 votes
1 answer

How to create a pair private/public keys using Node.js crypto?

Hello @kartik, nodejs v10.12 now supports this natively ...READ MORE

Oct 15, 2020 in Node-js by Niroj
• 82,840 points
4,870 views
0 votes
1 answer

How to “Ping” from a Node.js app?

Hello @kartik, You could use exec to call the system ...READ MORE

Oct 16, 2020 in Node-js by Niroj
• 82,840 points
4,782 views
0 votes
1 answer

How node.js require all files in a folder?

Hello @kartik, When require is given the path ...READ MORE

Nov 26, 2020 in Node-js by Niroj
• 82,840 points
2,802 views
0 votes
1 answer

How do I define methods in a Mongoose model?

Hello @kartik, You didn't specify whether you were ...READ MORE

Nov 27, 2020 in Node-js by Niroj
• 82,840 points
2,765 views
0 votes
1 answer

How to get path from the request in nodejs?

Hello @kartik, Try this out: var http = require('http'); var ...READ MORE

Oct 14, 2020 in Node-js by Niroj
• 82,840 points
4,554 views
0 votes
1 answer

How can I get the browser language in node.js?

Hello @kartik, You can use req.headers["accept-language"] to get the language/locale ...READ MORE

Oct 16, 2020 in Node-js by Niroj
• 82,840 points
4,348 views
0 votes
1 answer

How to use the middleware to check the authorization before entering each route in express?

Hello @kartik, As long as app.use(authChecker); is before app.use(app.router); it will get ...READ MORE

Nov 30, 2020 in Node-js by Niroj
• 82,840 points
2,088 views
0 votes
1 answer

How to break _.forEach in lodash?

Hello @kartik, To finish lodash#forEach method use return false; statement: _.forEach(oIncludedFileMap, function(aIncludedFiles, sKey) ...READ MORE

Nov 27, 2020 in Node-js by Niroj
• 82,840 points
2,113 views
0 votes
1 answer

How to update each dependency in package.json to the latest version?

Hello @kartik, npm-check-updates is a utility that automatically adjusts ...READ MORE

Nov 24, 2020 in Node-js by Niroj
• 82,840 points
2,141 views
0 votes
1 answer

How can i update multiple documents in mongoose?

Hello @kartik, Use: Device.updateMany({}, { cid: '' }); Hope it ...READ MORE

Oct 15, 2020 in Node-js by Niroj
• 82,840 points
3,872 views
0 votes
1 answer

How do I parse a data URL in Node?

Hello @kartik, Put the data into a Buffer ...READ MORE

Nov 30, 2020 in Node-js by Niroj
• 82,840 points
1,802 views
0 votes
1 answer

How do I update devDependencies in NPM?

Hello @kartik, To update package.json in addition to ...READ MORE

Jul 17, 2020 in Node-js by Niroj
• 82,840 points
7,640 views
0 votes
1 answer

Error:FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

Hello @kartik, You can launch NPM using : node ...READ MORE

Nov 27, 2020 in Node-js by Niroj
• 82,840 points
1,859 views
0 votes
1 answer

How to run Gulp tasks sequentially one after the other?

Hello @kartik, By default, gulp runs tasks simultaneously, ...READ MORE

Nov 26, 2020 in Node-js by Niroj
• 82,840 points
1,846 views
0 votes
1 answer

How to npm install to a specified directory?

Hello @kartik, You can use the --prefix option: mkdir -p ./install/here/node_modules npm ...READ MORE

Jul 15, 2020 in Node-js by Niroj
• 82,840 points
7,500 views
0 votes
0 answers

I got an error message while creating database in Expressjs

https://www.youtube.com/watch?v=JnvKXcSI7yk I got an error at 1:08:22 Code for ...READ MORE

Dec 17, 2020 in Node-js by nishant kumar
• 120 points
793 views
0 votes
1 answer

How to host a Node.Js application in shared hosting?

Hello @kartik, You can run node.js server on a typical ...READ MORE

Jul 17, 2020 in Node-js by Niroj
• 82,840 points
7,281 views
0 votes
1 answer

How to Get data from fs.readFile?

Hello @kartik, The function you have defined is ...READ MORE

Jul 15, 2020 in Node-js by Niroj
• 82,840 points
7,304 views
0 votes
1 answer

Error:npm install won't install devDependencies

Hello @kartik, Try: npm install --only=dev If you are worried ...READ MORE

Jul 15, 2020 in Node-js by Niroj
• 82,840 points
7,130 views
0 votes
1 answer

How to download a file with Node.js without using third-party libraries?

Hii, You can create an HTTP GET request and pipe ...READ MORE

Nov 24, 2020 in Node-js by Niroj
• 82,840 points
1,320 views
0 votes
1 answer

How to change to an older version of Node.js?

Hello, Install specific version of node sudo npm cache ...READ MORE

Nov 24, 2020 in Node-js by Niroj
• 82,840 points
1,265 views
0 votes
1 answer

How to run app.js in nodejs?

Hello @kartik, Assuming I have node and npm properly installed on the ...READ MORE

Oct 13, 2020 in Node-js by Niroj
• 82,840 points
3,048 views
0 votes
1 answer

How to get union of several immutable.js Lists?

Hello @kartik, Merge will update the index with ...READ MORE

Nov 30, 2020 in Node-js by Niroj
• 82,840 points
936 views