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

Lunr Search stuck on "Loading..." on front end #156

Open
jgleeson-everblue opened this issue Nov 13, 2024 · 3 comments
Open

Lunr Search stuck on "Loading..." on front end #156

jgleeson-everblue opened this issue Nov 13, 2024 · 3 comments

Comments

@jgleeson-everblue
Copy link

Anyone have a similar issue? Or know where to go to fix it?

Screenshot 2024-11-13 at 12 01 27
@praveenn77
Copy link
Owner

I will not work in dev mode.. you have to build and run it it any http server to check it

@hanisntsolo
Copy link

I am adding this comment because I gave some time to fix this in a mono repo setup where you want a build folder to handle multiple applications.

For somebody using this in a mono repo, moving the build files elsewhere and utilizing another forward proxy to serve it.

  1. First, you must be able to serve the build files from the newly changed directory in your forward proxy.
  2. Then you need to fix CSP headers in your forward proxy so that the inline javascript is not blocked and you should be good to go.

@linteck
Copy link

linteck commented Feb 19, 2025

Meet same issue.
Fixed by the hint from praveen77.

  1. Have to use 'npm run build' to create the search index file. And the file is generated into the ./build folder. (I guess this file only is created when you use 'npm run build')
  2. You have to use a http server to serve the ./build to your browser.
    I used node package 'http-server'. https://www.npmjs.com/package/http-server
    In stall it by command "npm install --save-dev http-server"
    And add this line in your project file package.json.
    "scripts": {
    "start-server": "http-server -p 8080 -a 127.0.0.1 ./build "
    }
  3. use command 'npm run start-server', then you can brow your document in 127.0.0.1:8080 and search bar works perfectly.
  4. Don't forget run 'npm run build' after you update your doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants