Most voted questions in Node-js

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,880 points
1,085 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,880 points
1,088 views
0 votes
1 answer

How to upgrad Node.js to latest version?

Hello, The module n makes version-management easy: sudo npm install n ...READ MORE

Nov 24, 2020 in Node-js by Niroj
• 82,880 points
347 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,880 points
1,873 views
0 votes
1 answer

How to find the version of an installed node.js/npm package?

Hello, npm view <package> version - returns the latest ...READ MORE

Nov 24, 2020 in Node-js by Niroj
• 82,880 points
6,212 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,880 points
5,084 views
0 votes
1 answer

Error: jQuery requires a window with a document

Hello @kartik, Try this: // definition var $ = require('jquery')(require("jsdom").jsdom().parentWindow); // ...READ MORE

Oct 16, 2020 in Node-js by Niroj
• 82,880 points
8,155 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,880 points
6,358 views
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,880 points
6,771 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,880 points
4,357 views
0 votes
1 answer

How to get “should.be.false” syntax pass jslint?

Hello @kartik, You can add /*jshint expr: true*/ to the ...READ MORE

Oct 16, 2020 in Node-js by Niroj
• 82,880 points
569 views
0 votes
1 answer

How to fill an input field using Puppeteer?

Hello @kartik, Just set value of input like ...READ MORE

Oct 16, 2020 in Node-js by Niroj
• 82,880 points
23,193 views
0 votes
1 answer

How to run shell script file using nodejs?

Hello @kartik, You could use "child process" module ...READ MORE

Oct 16, 2020 in Node-js by Niroj
• 82,880 points
8,602 views
0 votes
1 answer

How to split and modify a string in NodeJS?

Hello @kartik, Use split and map function: var str = "123, 124, 234,252"; var ...READ MORE

Oct 16, 2020 in Node-js by Niroj
• 82,880 points
907 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,880 points
3,785 views
0 votes
1 answer

How to set the content-type of request header when using Fetch APi?

Hello @kartik, You need to create a fetch ...READ MORE

Oct 15, 2020 in Node-js by Niroj
• 82,880 points
7,392 views
0 votes
1 answer

Error:TypeError: Object.values is not a function.

Hello @kartik, Object.values is a new feature . It is ...READ MORE

Oct 15, 2020 in Node-js by Niroj
• 82,880 points
1,968 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,880 points
4,866 views
0 votes
1 answer

Error: Cannot find module 'mongodb'

Hello @kartik, The error you are getting indicates ...READ MORE

Oct 15, 2020 in Node-js by Niroj
• 82,880 points
12,422 views
0 votes
1 answer

How to provide a mysql database connection in single file in nodejs?

Hello @kartik, You could create a db wrapper ...READ MORE

Oct 15, 2020 in Node-js by Niroj
• 82,880 points
8,557 views
0 votes
2 answers

Error:'TypeError: is not a function' in Node.js

You are exporting module.exports.redir = redir; That means that ...READ MORE

Oct 21, 2020 in Node-js by anonymous
• 140 points
16,653 views
0 votes
1 answer

Error:node' is not recognized as an internal or external command

Hello @kartik, Node is missing from the SYSTEM ...READ MORE

Oct 15, 2020 in Node-js by Niroj
• 82,880 points
7,691 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,880 points
4,531 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,880 points
6,033 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,880 points
3,568 views
0 votes
1 answer

How to deploy node app that uses grunt to heroku?

Hello @kartik, npm has a support for a postinstall step ...READ MORE

Oct 14, 2020 in Node-js by Niroj
• 82,880 points
527 views
0 votes
1 answer

How to rendering HTML in variable using Jade?

Hello @kartik, Code buffered by = is escaped ...READ MORE

Oct 14, 2020 in Node-js by Niroj
• 82,880 points
1,062 views
0 votes
1 answer

How to get hash of most recent git commit in Node?

Hello @kartik, Try this: revision = require('child_process') .execSync('git ...READ MORE

Oct 14, 2020 in Node-js by Niroj
• 82,880 points
2,290 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,880 points
4,131 views
0 votes
1 answer

How to force tsc to ignore node_modules folder?

Hello @kartik, Quickfix is to skip the check { ...READ MORE

Oct 14, 2020 in Node-js by Niroj
• 82,880 points
27,161 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,880 points
4,968 views
0 votes
1 answer

How to run node.js app forever when console is closed?

Hello @kartik, You may also want to consider ...READ MORE

Oct 14, 2020 in Node-js by Niroj
• 82,880 points
2,172 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,880 points
5,223 views
0 votes
1 answer

How to save a stream into multiple destinations with Gulp.js?

Hello @kartik, Currently you have to use two ...READ MORE

Oct 14, 2020 in Node-js by Niroj
• 82,880 points
1,323 views
0 votes
1 answer

Uncaught Error: Module did not self-register.", source: /home/niroj/dev/jukebox/node_modules/vlc/node_modules/ffi/node_modules/bindings/bindings.js (84)

Hello @kartik, If you've upgraded node then npm rebuild might ...READ MORE

Oct 13, 2020 in Node-js by Niroj
• 82,880 points
2,378 views
0 votes
1 answer

How to get the available tasks list in gulp?

Hello @kartik,  I got it use the gulp --tasks in ...READ MORE

Oct 13, 2020 in Node-js by Niroj
• 82,880 points
931 views
0 votes
1 answer

How to implement a writable stream?

Hello @kartik, to create a writeable stream is ...READ MORE

Oct 13, 2020 in Node-js by Niroj
• 82,880 points
1,055 views
0 votes
1 answer

npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Niroj\package.json'

Hello @kartik, If you already have package-lock.json file just delete ...READ MORE

Oct 13, 2020 in Node-js by Niroj
• 82,880 points
23,851 views
0 votes
1 answer

How to just run post-install?

Hello @kartik, You can run individual script entries ...READ MORE

Oct 13, 2020 in Node-js by Niroj
• 82,880 points
1,454 views
0 votes
1 answer

How to return data from Axios API?

Hello @kartik, The issue is that the original axiosTest() function ...READ MORE

Oct 13, 2020 in Node-js by Niroj
• 82,880 points
44,163 views
0 votes
1 answer

TypeError: Cannot read property 'confvar' of undefined

Hello @kartik, You need module.exports: An object which is shared ...READ MORE

Oct 13, 2020 in Node-js by Niroj
• 82,880 points
1,565 views
0 votes
1 answer

How to automate npm and bower install with grunt?

Hello @kartik, To install client side components during npm ...READ MORE

Oct 13, 2020 in Node-js by Niroj
• 82,880 points
557 views
0 votes
1 answer

How to use an include with attributes with sequelize?

Hello @kartik, Something like this should work foo.findAll({ ...READ MORE

Oct 13, 2020 in Node-js by Niroj
• 82,880 points
14,283 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,880 points
2,586 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,880 points
6,569 views
0 votes
1 answer

How to use MongoDB with promises in Node.js?

Hello @kartik, Try this: var MongoClient = require('mongodb').MongoClient var url ...READ MORE

Oct 12, 2020 in Node-js by Niroj
• 82,880 points
1,027 views
0 votes
1 answer

How to restart a node.js server?

Hello @kartik, If it's just running (not a ...READ MORE

Oct 12, 2020 in Node-js by Niroj
• 82,880 points
21,942 views
0 votes
1 answer

How do you run a js file using npm scripts?

Hello @kartik, Try this: { "scripts" : { ...READ MORE

Oct 12, 2020 in Node-js by Niroj
• 82,880 points
10,621 views
0 votes
1 answer

How to update a value in a json file and save it through node.js?

Hello @kartik, It's particularly useful if you're concerned ...READ MORE

Oct 12, 2020 in Node-js by Niroj
• 82,880 points
25,433 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,880 points
6,705 views