Error listen EACCES 0 0 0 0 80 OSx Node js

0 votes

This is the server.js file:

 var express = require('express');
  var app = express();
   app.use('/', express.static('./'));
    app.listen(80);

I get this error:

$ node server.js
events.js:154
      throw er; // Unhandled 'error' event
      ^

Error: listen EACCES 0.0.0.0:80

I know already, that the Error EACCES means that i don't have access rights to the port 80, but i don't know how to fix this. Any help much appreciated!

Oct 14, 2020 in Node-js by kartik
• 37,510 points
2,215 views

1 answer to this question.

0 votes

Hello @kartik,

Give root access to node and start server on port 80 you can do

sudo node app.js

this will start the server giving permission on port 80

Hope it helps!!

Thank You!!

answered Oct 14, 2020 by Niroj
• 82,780 points

Related Questions In Node-js

0 votes
1 answer

Error:node.js /socket.io/socket.io.js not found

Hello @kartik, Copying socket.io.js to a public folder (something as resources/js/socket.io.js) ...READ MORE

answered Nov 27, 2020 in Node-js by Niroj
• 82,780 points
8,891 views
0 votes
0 answers

Node.js Error: Cannot find module express

I have written a code for my ...READ MORE

May 9 in Node-js by Kichu
• 19,040 points
1,200 views
0 votes
1 answer

How to read environment variables in Node.js?

Hello @kartik, Yes,you can read environment variables in Node.js ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,780 points
855 views
0 votes
1 answer

How to write files in Node.js?

Hello @kartik, Currently there are three ways to ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,780 points
372 views
0 votes
1 answer

jQuery AJAX fires error callback on window unload - how do I filter out unload and only catch real errors?

Hello, In the error callback or $.ajax you have three ...READ MORE

answered Apr 27, 2020 in Java-Script by Niroj
• 82,780 points
2,512 views
0 votes
1 answer

How do I pass command line arguments to a Node.js program?

Hello @kartik, If your script is called myScript.js ...READ MORE

answered May 5, 2020 in Java-Script by Niroj
• 82,780 points
2,049 views
0 votes
1 answer

Error:Issue when trying to use IN() in wordpress database

Hello @kartik, Try this code : // Create an ...READ MORE

answered May 8, 2020 in PHP by Niroj
• 82,780 points
392 views
+2 votes
1 answer

How do I debug Node.js applications?

Hello @kartik, Use node-inspector  from any browser supporting WebSocket. Breakpoints, ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,780 points
383 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

answered Oct 21, 2020 in Node-js by anonymous
• 140 points
10,229 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

answered Oct 16, 2020 in Node-js by Niroj
• 82,780 points
3,969 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP