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

"Invalid listen argument" when defining port

Open tim-phillips opened this issue 6 years ago • 2 comments

now-server -r rules.json works fine, but when I run now-server -r rules-dev.json -p 3001 I get the following:

Error: Invalid listen argument: { port: true }
    at Server.listen (net.js:1482:9)
    at Object.<anonymous> (/Users/development/.config/yarn/global/node_modules/now-server/index.js:52:4)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Function.Module.runMain (module.js:609:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:598:3

tim-phillips avatar Sep 08 '17 21:09 tim-phillips

Same error, the custom port is not working.

sergiodxa avatar Sep 08 '17 21:09 sergiodxa

Solved by https://github.com/markmarijnissen/now-server/pull/2

allain avatar Oct 03 '17 14:10 allain