After fresh project clone, `npm run dev` errors with `Pagefind` error
Open
Nobody has claimed this yet.
- Dominant language
- Edge
- Stars
- 21
- Forks
- 33
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 1
Description
Package version
0.0.0
Describe the bug
npm run dev errors out with following message:
npm run dev
> v7-new-docs@0.0.0 predev
> npm run dev:search:index
> v7-new-docs@0.0.0 dev:search:index
> pagefind --site build/public --output-path=public/pagefind
Running Pagefind v1.5.2 (Extended)
Running from: "/home/mcsneaky/Projects/AdonisJS/v7-docs"
Source: "build/public"
Output: "public/pagefind"
[Walking source directory]
Found 0 files matching **/*.{html}
[Parsing files]
Did not find a data-pagefind-body element on the site.
↳ Indexing all <body> elements on the site.
[Reading languages]
Discovered 0 languages:
[Building search indexes]
Total:
Indexed 0 languages
Indexed 0 pages
Indexed 0 words
Indexed 0 filters
Indexed 0 sorts
Error: Pagefind was not able to build an index.
Most likely, the directory passed to Pagefind was empty or did not contain any html files.
Error: Pagefind was not able to build an index.
Most likely, the directory passed to Pagefind was empty or did not contain any html files.
How to reproduce:
git clonenpm installcp .env.example .envnode ace generate:keynpm run dev
Running node ace serve --hmr directly works tho, seems like issue comes from predev npm run dev:search:index
Reproduction repo
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the package scripts behind predev and dev:search:index, then run the documented clone and setup steps to confirm that build/public is empty when Pagefind runs. Trace how node ace serve --hmr produces the site and ensure npm run dev waits for or performs that build before indexing. Done means the documented npm run dev starts without the Pagefind error and search indexing succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- search, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100