Latest questions in Node-js

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,842 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,161 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,046 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,093 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,318 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,702 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,325 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
548 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,130 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,479 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
882 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,757 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,314 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,938 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,782 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,299 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,489 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,585 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,596 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,506 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
5,958 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,542 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
518 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,050 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,258 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,096 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
26,978 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,898 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,155 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,186 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,308 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,357 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
915 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,035 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,782 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,439 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,037 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,542 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
542 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,180 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,554 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,523 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,008 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,834 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,543 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,376 views
+1 vote
1 answer

How to make external HTTP requests with Node.js ?

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

Oct 12, 2020 in Node-js by Niroj
• 82,880 points
1,478 views
+1 vote
1 answer

How to restore/reset npm configuration to default values?

Hello @kartik, To reset user defaults Run this in ...READ MORE

Oct 12, 2020 in Node-js by Niroj
• 82,880 points
18,605 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,664 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,880 points
5,710 views