Most viewed questions in Node-js

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,434 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,064 views
0 votes
0 answers

error: This is probably not a problem with npm. There is likely additional logging output above

I am trying to deploy my project ...READ MORE

May 10, 2022 in Node-js by Kichu
• 19,050 points
8,027 views
0 votes
1 answer

Result always undefined when return the result Nodejs

One easy way to do it would ...READ MORE

Jun 7, 2022 in Node-js by Neha
• 9,060 points
7,883 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,552 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,270 views
0 votes
1 answer

how to verify jwt token in nodejs / never expire?

You can achieve this by using the ...READ MORE

Jun 17, 2022 in Node-js by Neha
• 9,060 points
6,967 views
0 votes
1 answer

Download a file from NodeJS Server using Express

Because the file's name is just 'download' ...READ MORE

Jun 13, 2022 in Node-js by Neha
• 9,060 points
6,916 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,880 points
6,821 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,880 points
6,817 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,880 points
6,796 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,880 points
6,712 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,674 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,880 points
6,643 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,638 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,493 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,880 points
6,459 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,294 views
0 votes
1 answer

How can I update npm on Windows?

Hello @kartik, To update NPM, this worked for ...READ MORE

Jul 13, 2020 in Node-js by Niroj
• 82,880 points
6,175 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,128 views
0 votes
1 answer

Error:npm not working after clearing cache

Hello @kartik, Try this: npm cache clean --force OR It ...READ MORE

Jul 17, 2020 in Node-js by Niroj
• 82,880 points
6,067 views
0 votes
1 answer

Error: listen EADDRINUSE while using nodejs?

Hello @kartik, EADDRINUSE means that the port number which listen() tries ...READ MORE

Jul 9, 2020 in Node-js by Niroj
• 82,880 points
6,042 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,931 views
0 votes
1 answer

How do I perform an id array query in Mongoose?

Hello @kartik, Here is a mongoosey way to ...READ MORE

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

How to create a directory if it doesn't exist using Node.js?

Hello @kartik, Try: var fs = require('fs'); var dir = ...READ MORE

Jul 9, 2020 in Node-js by Niroj
• 82,880 points
5,729 views
0 votes
1 answer

Error:npm WARN unmet dependency in nodejs

Hii @kartik, Following are the possible solution : Manually ...READ MORE

Jul 12, 2020 in Node-js by Niroj
• 82,880 points
5,715 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,685 views
0 votes
1 answer

How to get access to webpack-dev-server from devices in local network?

Hello @kartik, You can set your ip address ...READ MORE

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

How to include route handlers in multiple files in Express?

Hello @kartik, If you want to put the routes ...READ MORE

Jul 15, 2020 in Node-js by Niroj
• 82,880 points
5,528 views
0 votes
1 answer

How to pass text/plain content in axios POST request in nodejs?

var config = { ...READ MORE

Jun 14, 2022 in Node-js by Neha
• 9,060 points
5,213 views
0 votes
1 answer

How to create package.json from package-lock.json?

Hello @kartik, Install the latest npm with npm install ...READ MORE

Nov 30, 2020 in Node-js by Niroj
• 82,880 points
5,211 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,166 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,023 views
0 votes
1 answer

How do I install node-sass using VSCode?

Hello @ Ebuka, Here is the following things you ...READ MORE

Jul 14, 2020 in Node-js by Niroj
• 82,880 points
5,019 views
0 votes
1 answer

How to set custom favicon in Express?

Hello @kartik,  Just use: app.use('/favicon.ico', express.static('images/favicon.ico')); OR In express: //you probably ...READ MORE

Jul 17, 2020 in Node-js by Niroj
• 82,880 points
5,014 views
0 votes
2 answers

Compress image up to maximum size(100kb) at NodeJS or React Native

Image Compression in React Native is a ...READ MORE

Apr 1, 2023 in Node-js by DSKView
• 180 points
4,924 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,872 views
0 votes
1 answer

How to set different destinations in nodejs using multer?

With multer 1.2.1. You need to use DiskStorage to specify where & how of the ...READ MORE

Jun 13, 2022 in Node-js by Neha
• 9,060 points
4,871 views
0 votes
1 answer

How can I pretty-print JSON using node.js?

Hello @kartik, JSON.stringify's third parameter defines white-space insertion ...READ MORE

Jul 12, 2020 in Node-js by Niroj
• 82,880 points
4,757 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,741 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,880 points
4,727 views
0 votes
1 answer

How to reload or re-render the entire page using AngularJS?

Hello @kartik< For the record, to force angular ...READ MORE

Jul 15, 2020 in Node-js by Niroj
• 82,880 points
4,655 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,880 points
4,533 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,488 views
0 votes
1 answer

Error:Nodejs cannot find installed module on Windows

Hello @kartik, Add an environment variable called NODE_PATH and set ...READ MORE

Jul 15, 2020 in Node-js by Niroj
• 82,880 points
4,469 views
0 votes
1 answer

How to use pino-transport in nodejs for logs?

Ensure that you have a recent version ...READ MORE

Jun 9, 2022 in Node-js by Neha
• 9,060 points
4,407 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,300 views
0 votes
1 answer

Otp Verification in nodejs?

Yes, a package named sendotp exists. This ...READ MORE

Jun 10, 2022 in Node-js by Neha
• 9,060 points
4,292 views
0 votes
1 answer

Error:nvm is not compatible with the npm config "prefix" option:

Hello @kartik, After installing nvm using brew, create ~/.nvm directory: $ ...READ MORE

Jul 15, 2020 in Node-js by Niroj
• 82,880 points
4,212 views
0 votes
1 answer

Error:npm WARN package.json: No repository field

Hello @kartik, It's just a check as of NPM ...READ MORE

Jul 20, 2020 in Node-js by Niroj
• 82,880 points
4,099 views