node.js - Node http-server not working on Windows 10 Ubuntu Bash -


i tried install nodejs http-server on windows 10 ubuntu bash, installation worked fine running serve static site $http-server src throws error:

$ http-server src  /usr/lib/node_modules/http-server/bin/http-server:14 var ifaces = os.networkinterfaces();                 ^ error: einval, invalid argument     @ object.<anonymous> (/usr/lib/node_modules/http-server/bin/http-server:14:17)     @ module._compile (module.js:456:26)     @ object.module._extensions..js (module.js:474:10)     @ module.load (module.js:356:32)     @ function.module._load (module.js:312:12)     @ function.module.runmain (module.js:497:10)     @ startup (node.js:119:16)     @ node.js:945:3 

what can missing here? not supported yet ubuntu bash on windows 10?

update: issue has been fixed since windows 10 creators update (april 2017).

this known issue[1][2][3][4] regards low-level networking code has not yet been implemented bash on windows or windows-linux subsystem (wsl).

until fixed, can try using live-server:

sudo npm install live-server -g live-server src 

or possibly python's simplehttpserver:

cd src python -m simplehttpserver 8000 

to fix sooner, suggested vote issue on bash on windows uservoice site microsoft using votes determine issues prioritize fixing in upcoming updates.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -