koka-lang / madoko

Madoko is a fast markdown processor for high quality academic and technical articles
Other
393 stars 42 forks source link

madoko-local throws various errors (160, 183, 141) for different versions of node.js (6.0.0, 6.11.5, 8.9.0, 4.2.2) #28

Open tlyim opened 6 years ago

tlyim commented 6 years ago

Below is the error thrown when using Try it out - Test madoko-local in your browser (https://npm.runkit.com/madoko-local):

ErrorStack Trace Viewer Error: listen EACCES 127.0.0.1:80 at util._errnoException in core util.js — line 1024 at util._exceptionWithHostPort in core util.js — line 1046 at Server.setupListenHandle (as _listen2) in core net.js — line 1334 at listenInCluster in core net.js — line 1392 at GetAddrInfoReqWrap.doListen (as callback) in core net.js — line 1501 at GetAddrInfoReqWrap.onlookup (as oncomplete) in core dns.js — line 97

The errors cannot be fixed even after following fix suggestions like: https://stackoverflow.com/questions/38841204/events-js160-throw-er-unhandled-error-event https://piotrkrzyzek.com/solved-events-js160-throw-er-unhandled-error-event/

krishnakumarg1984 commented 6 years ago

I can confirm this.

Madoko does not work for node-9.0 and above.

Artoria2e5 commented 6 years ago

Have you tried allowing node to bind to ports like 80 by running something like https://gist.github.com/firstdoit/6389682? If it's an EACCES it's probably a permission problem.

(And @daanx probably should pick a higher port for madoko-local instead…)

tlyim commented 6 years ago

just fixed this problem on my laptop (running Windows 8) after

  1. updating to node.js (8.11) AND
  2. doing the following things (in the reverse order of what I did): a. Stop the IIS ( https://www.c-sharpcorner.com/forums/how-to-disable-iis-on-windows ; https://stackoverflow.com/questions/19030371/run-node-js-webbapp-on-80-port-on-windows ) b. Add firewall rule ( https://coderwall.com/p/mbov6w/running-nodejs-and-express-on-windows ) c. node server.js ( https://www.quora.com/What-are-the-simplest-steps-to-start-node-js-work-on-port-80-in-Windows )

I suspect only 1 and 2a are essential. Maybe others with the same problem can try them first to see if they are the only critical to solving the problem.

Artoria2e5 commented 6 years ago

Yeah, for a bind to be successful the port needs to be not used by anything else too.