Describe the bug
i'm running sapper export for my blog, and suddenly started receiving this new error: "URL must be a string. Received undefined".

I have no idea where this error message comes from, and so no idea how to fix it. still trying to figure out how to repro but figured i would log this issue first.
To Reproduce
not sure yet. if i know i'll update this
Expected behavior
the error message tells me how to fix it.
Stacktraces
not yet
Information about your Sapper Installation:
0.27.9
3.12.1
export
rollup
Severity
How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of Sapper entirely?
blocking me only right now.
Could this be related to https://github.com/sveltejs/svelte/pull/3846 and https://github.com/sveltejs/svelte/pull/3862?
Could this be related to sveltejs/svelte#3846 and sveltejs/svelte#3862?
no, the only thing that #3846 or #3862 do differently is splitting (String.prototype.split) and encoding (encodeURI). Neither of those ever produce undefined.
Problem MUST be elsewhere :thinking:
whats really frustrating is i dont even know the source of the error message. no error stack, nothing in the export stack i can see logs out this error message specifically. such a terrible dx! i bet once we find the source of thus issue we鈥檒l be able to improve logging for lots of people not just me
I bet it's coming from here: https://github.com/sveltejs/sapper/blob/b1c4585c874fd156aaa36cc1d71abb6864faa279/src/cli.ts#L266
Otherwise you can try this trick: console.error = console.log = console.trace as the first line in your entry point.
@rixo that was exactly what i needed to do. it gave me the stack trace i needed to go identify and fix my problem:

@pngwn @Conduitry would you take a PR to log out the stack trace for these errors? i strongly believe we should not swallow the stack trace. just error messages alone aren't enough. just need to agree on how to log this prettily if you care about that sort of thing.
@sw-yx sorry, just seen this.
I agree we should not be swallowing the stack trace here. We definitely need to show that when something goes wrong like in this case.
Most helpful comment
I bet it's coming from here: https://github.com/sveltejs/sapper/blob/b1c4585c874fd156aaa36cc1d71abb6864faa279/src/cli.ts#L266
Otherwise you can try this trick:
console.error = console.log = console.traceas the first line in your entry point.