http-server icon indicating copy to clipboard operation
http-server copied to clipboard

Can't start it from node 5.0.0 - Can't find module `colors`

Open gepser opened this issue 11 years ago • 6 comments

This is simple, when I try to run the command http-server from node 5.0.0 I get this error:

~  http-server
module.js:339
    throw err;
    ^

Error: Cannot find module 'colors'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/usr/local/bin/http-server:5:18)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:457:10)

But, if I run the same command with node 4.2.2 everything works just fine.

I am using nvm to switch between node versions.

gepser avatar Nov 10 '15 04:11 gepser

I have the same problem

yanyu0517 avatar Nov 11 '15 03:11 yanyu0517

PR welcome. Not sure when I'll have the time to dig into this.

indexzero avatar Nov 11 '15 03:11 indexzero

i have the same problem :(

rjankathi avatar Jun 21 '16 22:06 rjankathi

It seems like the Travis builds run neither on Node 5 nor on Node 6. That would be a first step towards proper support, right?

derhuerst avatar Jun 21 '16 22:06 derhuerst

I am not able to reproduce this, http-server runs for me on both node 5.0.0 and 5.12.0

thornjad avatar Oct 28 '18 03:10 thornjad

Closing since Node 5.x.x is no longer maintained.

thornjad avatar Apr 15 '19 16:04 thornjad