Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

livereload fails on S3 http web hosting #190

Open
dogatana opened this issue Mar 1, 2021 · 3 comments
Open

livereload fails on S3 http web hosting #190

dogatana opened this issue Mar 1, 2021 · 3 comments
Labels
Status: Need More Info Lacks enough info to make progress Type: Documentation Documentation only changes

Comments

@dogatana
Copy link
Contributor

dogatana commented Mar 1, 2021

livereload fails on S3 http web hosting

I deployed the whole contents of _book to AWS S3 that static web hosting is enabled.
I this case, the following request is refused by S3 because a port 35729 is used to get the livereload.js (my guess).

capture

Chrome browser shows a "circling icon" on the tab, while it's waiting for a response from AWS S3.

Liveload is a very useful tool when developing, but I don't need it when deploying to a server.

Any clue to disable livereload or build a book without livereload?

  • HonKit version: 3.6.16

Step to reproduce

  1. build a book
  2. upload _book to AWS S3
  3. browse it

This issue also happens when I use another web server, python in my case, to serve the contents.

Expected results

Livereload is disabled for production.

Actual results

Livereload try to work but fails.

@azu
Copy link
Member

azu commented Mar 1, 2021

It's look like strange.
honkit build will not livereload plugin.
honkit serve will add this plugin.

// @ts-expect-error ts-migrate(2554) FIXME: Expected 3 arguments, but got 2.
config = Modifiers.Config.addPlugin(config, "livereload");

  1. build a book

Can you use honkit build?

@azu azu added the Status: Need More Info Lacks enough info to make progress label Mar 1, 2021
@dogatana
Copy link
Contributor Author

dogatana commented Mar 1, 2021

Thanks for your reply.
I could reproduce this by the following steps.

  1. npx honkit init
  2. npx honkit build
  3. npx honkit serve to confirm and test
  4. deploy the _book

At the step 3, livereload stored into the _book/gitbook and it may have caused the error.

So I should have done the following steps.

  1. npx honkit init
  2. npx honkit build
  3. npx honkit serve to confirm and test
  4. npx honkit build again
  5. deploy the _book

I did care about plugins that I installed but didn't about one that is installed by "serve".
It might be good if FAQ has an entry for this behavior.

Anyway I can test the performance now, thanks so much!

@azu
Copy link
Member

azu commented Mar 6, 2021

related #34

@azu azu added the Type: Documentation Documentation only changes label Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Need More Info Lacks enough info to make progress Type: Documentation Documentation only changes
Projects
None yet
Development

No branches or pull requests

2 participants