CloudCannon / pagefind

Static low-bandwidth search at scale
https://pagefind.app
MIT License
3.48k stars 113 forks source link

Vercel build message: Process exited with status 0 #717

Closed smallstepstoday closed 2 weeks ago

smallstepstoday commented 2 weeks ago

When deploying a Next.js project with Pagefind added, Vercel reports an error message.

A repo that demonstrates the issue can be found here.

Here is an excerpted build log from Vercel:

...
[18:38:45.136] Running "pnpm run build"
[18:38:45.598] 
[18:38:45.598] > next-pnpm-pagefind@0.1.0 build /vercel/path0
[18:38:45.598] > next build
[18:38:45.598] 
[18:38:46.333] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[18:38:46.333] This information is used to shape Next.js' roadmap and prioritize features.
[18:38:46.333] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[18:38:46.333] https://nextjs.org/telemetry
[18:38:46.333] 
[18:38:46.389]   ▲ Next.js 14.2.11
[18:38:46.389]   - Experiments (use with caution):
[18:38:46.389]     · scrollRestoration
[18:38:46.389] 
[18:38:46.459]    Creating an optimized production build ...
[18:38:56.043]  ✓ Compiled successfully
[18:38:56.044]    Skipping linting
[18:38:56.044]    Checking validity of types ...
[18:38:58.817]    Collecting page data ...
[18:38:59.744]    Generating static pages (0/6) ...
...
[18:39:06.529] > next-pnpm-pagefind@0.1.0 postbuild /vercel/path0
[18:39:06.529] > pagefind --verbose --site .next/server/app/ --glob **/*.{html} --output-path .next/static/chunks/app/search/pagefind
[18:39:06.529] 
[18:39:06.585] pagefind npm wrapper: Running the executable at /vercel/path0/node_modules/.pnpm/@pagefind+linux-x64@1.1.1/node_modules/@pagefind/linux-x64/bin/pagefind_extended
[18:39:06.597] 
[18:39:06.597] Running Pagefind v1.1.1 (Extended)
[18:39:06.597] Running in verbose mode
[18:39:06.597] Running from: "/vercel/path0"
[18:39:06.597] Source:       ".next/server/app"
[18:39:06.597] Output:       ".next/static/chunks/app/search/pagefind"
[18:39:06.597] 
[18:39:06.597] [Walking source directory]
[18:39:06.599] Found 3 files matching **/*.{html}
[18:39:06.599] 
[18:39:06.600] [Parsing files]
[18:39:06.607] Did not find a data-pagefind-body element on the site.
[18:39:06.607] ↳ Indexing all <body> elements on the site.
[18:39:06.607] 
[18:39:06.607] [Reading languages]
[18:39:06.607] Discovered 1 language: en
[18:39:06.607]   * en: 3 pages
[18:39:06.607] 
[18:39:06.607] [Building search indexes]
[18:39:06.607] Language en: 
[18:39:06.607]   Indexed 3 pages
[18:39:06.608]   Indexed 20 words
[18:39:06.608]   Indexed 0 filters
[18:39:06.608]   Indexed 0 sorts
[18:39:06.608] 
[18:39:06.608] Total: 
[18:39:06.608]   Indexed 1 language
[18:39:06.608]   Indexed 3 pages
[18:39:06.608]   Indexed 20 words
[18:39:06.608]   Indexed 0 filters
[18:39:06.608]   Indexed 0 sorts
[18:39:06.612] 
[18:39:06.613] Finished in 0.017 seconds
[18:39:06.613] pagefind npm wrapper: Process exited with status 0
[18:39:06.683] Traced Next.js server files in: 38.663ms
[18:39:06.753] Created all serverless functions in: 69.573ms
[18:39:06.761] Collected static files (public/, static/, .next/static): 5.047ms
[18:39:06.790] Build Completed in /vercel/output [29s]
[18:39:06.849] Deploying outputs...
[18:39:16.635] 
[18:39:16.892] Deployment completed
[18:39:24.182] Uploading build cache [153.27 MB]...
[18:39:27.335] Build cache uploaded: 3.152s

Although the build ultimately succeeds, the build log highlights the line pagefind npm wrapper: Process exited with status 0 as an error.

bglw commented 2 weeks ago

👋 Hey @smallstepstoday

In verbose mode, Pagefind's npm wrapper always logs out the exit code from the indexing binary. The good news is that zero is the exit code for success, so that log is just saying that Pagefind ran successfully 🙂