serve icon indicating copy to clipboard operation
serve copied to clipboard

Difference of behaviour between serve and http-server

Open eric-burel opened this issue 5 years ago • 8 comments

Hi, we have noticed some discrepancies between serve and http-server when opening a Storybook static export. Issue is described here: https://github.com/storybookjs/storybook/issues/10933

To sum it up, with http-server the first story opens correctly, but not with serve, which seems a bit less reliable for yet unknown reasons. image

While you should get this (this is the result with http-server): image

It sounds like a failing redirection but I have no log message.

I have a reproduction, but not minimal, in Vulcan Next. That may still help to debug.

git clone https://github.com/VulcanJS/vulcan-next.git
cd vulcan-next
yarn
yarn build:storybook
serve storybook-static # this will mostly work but not reliably, while http-server will work ok

eric-burel avatar Sep 09 '20 16:09 eric-burel

serve needs at least cleanUrl:false option

theKashey avatar Nov 03 '20 21:11 theKashey

cleanUrls seems to break everything for me: image

eric-burel avatar Nov 04 '20 07:11 eric-burel

See https://github.com/vercel/next.js/pull/18775 for a reproducible minimal example

eric-burel avatar Nov 04 '20 07:11 eric-burel

Any update on this @eric-burel? We can't use http-server because it doesn't compress files.

I can't think of other solutions 🤔

baptisteArno avatar Oct 06 '22 13:10 baptisteArno

Haven't checked in a while! Do you still have this issue? You'll probably want to access the right URL directly, maybe smth like "/index.html".

eric-burel avatar Oct 06 '22 16:10 eric-burel

Yep, problem still exists! We ended up using static-web-server.

baptisteArno avatar Oct 07 '22 08:10 baptisteArno

I'm curious what the difference is between serve and https-server🤔

Wxh16144 avatar Apr 09 '23 05:04 Wxh16144