porsager / wright

🚀 Work Fast Work Wright
Do What The F*ck You Want To Public License
180 stars 15 forks source link

Parameter "url" must be a string, not a boolean #15

Closed barneycarroll closed 7 years ago

barneycarroll commented 7 years ago

If config.main isn't an HTTP URI, config.external is set to false. This screws things up when serve.js unconditionally tries to parse it as a URI and extract the host. This is odd, since earlier parts of serve.js seem to expect config.external to be a boolean or at least falsey.

Starting wright...
Error: TypeError: Parameter "url" must be a string, not boolean
    at Url.parse (url.js:87:11)
    at Object.urlParse [as parse] (url.js:81:5)
    at Promise (C:\Program Files\Nodist\bin\node_modules\wright\lib\serve.js:40:39)
    at module.exports.start (C:\Program Files\Nodist\bin\node_modules\wright\lib\serve.js:30:10)
porsager commented 7 years ago

Hi Barney. Thanks a lot, for the heads up. I really should get some tests set up.

barneycarroll commented 7 years ago

Haha yeah I have that problem too. So hard to develop tooling that's still evolving and make rational tests alongside, a lot of the time it feels like you're overformalising self-evident stuff that's liable to change any minute anyway.