It seems like it's throwing when the directory doesn't exist:
if (await pathType.dir(related)) { // ...
This used to work, but now it's broken :(
I'm simply using serve ./build --single and a react-app created app.
🤔
Could this be related to the recent change of the package behind name serve - this is the old package. The package name is now owned by a different group of people (@zeit - us) and we added a different content to it.
According to the semver spec, we incremented the major version number... So serve 1.4.0 probably contains the serve you were looking for
Thanks for your effort in collecting these details, @jamo! But --single is actually a flag that we introduced. Because of that, I guess we should fix it and check if the dir exists.
I could fix it too if no one gets to it later. Just isn't a show stopper right now since we're not public yet :)
Sent from my iPhone
On Jan 18, 2017, at 12:34 AM, Leo Lamprecht notifications@github.com wrote:
Thanks for your effort in collecting these details, @jamo! But --single is actually a flag that we introduced. Because of that, I guess we should fix it and check if the dir exists.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
I just ran into this issue i guess.
serving a SPA with serve, where directly opening http://example.org/suburl results in a error 500.
@rase- sent me the server error:
Error: ENOENT: no such file or directory, stat "/home/app/dist/suburl"
I encounter the same issue: version 2.4.2 breaks, but 2.4.0 works for me with a SPA and the -s flag.
So this should have nothing to do with the v1 -> v2 change.
i can confirm that. 2.4.2 is working as expected
update: sorry for that misunderstanding. I tried @DcsMarcRemolt suggestion and downgraded to 2.4.0. And 2.4.0 is working as expected, NOT 2.4.2
@littleStudent I don't see it working and looking at the latest PRs, nothing touched this code. :-
Confirm that it does not work in 2.4.2. To be clear, my definition of "not working" is that any non-index page will result in Internal Server Error on its initial load.
http://localhost:60007/ # works
http://localhost:60007/blog # does not
http://localhost:60007/blog/article1 # does not
Additionally, the console stack is this:
Error: ENOENT: no such file or directory, stat '/Users/lukee/repos/oss/inferno/inferno-starter/dist/blog/article1'
at Error (native)