Pagefind + ELIFECYCLE + pnpm run build errors #187
Unanswered
sky-limits
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Please try not to enable SSR by removing the following lines of code. It seems that SSR isn't working at the moment, and I'll take another look at it when I have time. output: 'server',
adapter: vercel(), |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is my first time working with a project like this, and I'm not very knowledgeable in Git, so please be patient with me and let me know if I need to provide any other information!
I forked this repo, made my edits, essentially followed all instructions in both Vercel's deployment info & and guide here. On deployment, I get three errors; and I'm not quite sure where they're coming from, as pnpm & npm are installed and working - anf both Pagefind and ELIFECYCLE are entirely unknown variables. I'm pasting my log below, with some removed text for privacy (indicated by [text]). Thanks!
[23:40:08.178] Running build in [location]
[23:40:08.310] Cloning github.com/sky-limits/fuwari (Branch: main, Commit: 78ac726)
[23:40:08.654] Previous build cache not available
[23:40:08.655] Cloning completed: 345.04ms
[23:40:09.061] Running "vercel build"
[23:40:11.122] Vercel CLI 37.4.0
[23:40:11.968] Detected
pnpm-lock.yaml
version 9 generated by [email protected][23:40:11.983] Installing dependencies...
[23:40:12.566] Lockfile is up to date, resolution step is skipped
[23:40:12.722] Progress: resolved 1, reused 0, downloaded 0, added 0
[23:40:12.951] Packages: +1086
[23:40:12.951] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[23:40:13.728] Progress: resolved 1086, reused 0, downloaded 19, added 6
[23:40:14.730] Progress: resolved 1086, reused 0, downloaded 77, added 62
[23:40:15.732] Progress: resolved 1086, reused 0, downloaded 136, added 123
[23:40:16.732] Progress: resolved 1086, reused 0, downloaded 186, added 171
[23:40:17.733] Progress: resolved 1086, reused 0, downloaded 293, added 280
[23:40:18.735] Progress: resolved 1086, reused 0, downloaded 404, added 394
[23:40:19.736] Progress: resolved 1086, reused 0, downloaded 501, added 496
[23:40:20.761] Progress: resolved 1086, reused 0, downloaded 640, added 631
[23:40:21.765] Progress: resolved 1086, reused 0, downloaded 792, added 790
[23:40:22.765] Progress: resolved 1086, reused 0, downloaded 874, added 862
[23:40:23.767] Progress: resolved 1086, reused 0, downloaded 944, added 932
[23:40:24.768] Progress: resolved 1086, reused 0, downloaded 988, added 975
[23:40:25.770] Progress: resolved 1086, reused 0, downloaded 1021, added 1011
[23:40:26.193] Progress: resolved 1086, reused 0, downloaded 1084, added 1086, done
[23:40:26.721] .../[email protected]/node_modules/sharp install$ node install/check
[23:40:26.724] .../[email protected]/node_modules/esbuild postinstall$ node install.js
[23:40:26.725] .../.pnpm/[email protected]/node_modules/swup postinstall$ opencollective-postinstall || true
[23:40:26.739] .../node_modules/@biomejs/biome postinstall$ node scripts/postinstall.js
[23:40:26.923] .../.pnpm/[email protected]/node_modules/swup postinstall: Done
[23:40:26.965] .../node_modules/@biomejs/biome postinstall: Done
[23:40:26.974] .../[email protected]/node_modules/esbuild postinstall: Done
[23:40:27.034] .../[email protected]/node_modules/sharp install: Done
[23:40:27.251]
[23:40:27.251] dependencies:
[23:40:27.251] + @astrojs/check 0.9.3
[23:40:27.251] + @astrojs/rss 4.0.7
[23:40:27.256] + @astrojs/sitemap 3.1.6
[23:40:27.256] + @astrojs/svelte 5.7.0
[23:40:27.256] + @astrojs/tailwind 5.1.0
[23:40:27.256] + @astrojs/vercel 7.8.1
[23:40:27.256] + @fontsource-variable/jetbrains-mono 5.1.0
[23:40:27.256] + @fontsource/roboto 5.1.0
[23:40:27.256] + @swup/astro 1.4.1
[23:40:27.256] + astro 4.15.6
[23:40:27.257] + astro-compress 2.3.1
[23:40:27.257] + astro-icon 1.1.1
[23:40:27.257] + colorjs.io 0.5.2
[23:40:27.257] + hastscript 9.0.0
[23:40:27.257] + markdown-it 14.1.0
[23:40:27.257] + mdast-util-to-string 4.0.0
[23:40:27.257] + overlayscrollbars 2.10.0
[23:40:27.257] + pagefind 1.1.1
[23:40:27.257] + reading-time 1.5.0
[23:40:27.257] + rehype-autolink-headings 7.1.0
[23:40:27.257] + rehype-components 0.3.0
[23:40:27.258] + rehype-katex 7.0.1
[23:40:27.258] + rehype-slug 6.0.0
[23:40:27.258] + remark-directive 3.0.0
[23:40:27.258] + remark-directive-rehype 0.4.2
[23:40:27.258] + remark-math 6.0.0
[23:40:27.258] + sanitize-html 2.13.0
[23:40:27.258] + sharp 0.33.5
[23:40:27.258] + svelte 4.2.19
[23:40:27.258] + tailwindcss 3.4.11
[23:40:27.258] + typescript 5.6.2
[23:40:27.259] + unist-util-visit 5.0.0
[23:40:27.259]
[23:40:27.260] devDependencies:
[23:40:27.260] + @astrojs/ts-plugin 1.10.2
[23:40:27.260] + @biomejs/biome 1.8.3
[23:40:27.260] + @iconify-json/fa6-brands 1.2.0
[23:40:27.260] + @iconify-json/fa6-regular 1.2.0
[23:40:27.260] + @iconify-json/fa6-solid 1.2.0
[23:40:27.261] + @iconify-json/material-symbols 1.2.1
[23:40:27.261] + @iconify/svelte 4.0.2
[23:40:27.261] + @rollup/plugin-yaml 4.1.2
[23:40:27.261] + @tailwindcss/typography 0.5.15
[23:40:27.261] + @types/markdown-it 14.1.2
[23:40:27.261] + @types/mdast 4.0.4
[23:40:27.261] + @types/sanitize-html 2.13.0
[23:40:27.261] + photoswipe 5.4.4
[23:40:27.261] + remark-github-admonitions-to-directives 1.0.5
[23:40:27.262] + sass 1.78.0
[23:40:27.262] + stylus 0.63.0
[23:40:27.262]
[23:40:27.284] Done in 15.2s
[23:40:27.383] Running "pnpm run build"
[23:40:27.861]
[23:40:27.861] > [email protected] build /vercel/path0
[23:40:27.861] > astro build && pagefind --site dist
[23:40:27.861]
[23:40:30.550] 03:40:30 [WARN] [config] The adapter @astrojs/vercel/serverless provides experimental support for "astro:env getSecret". You may experience issues or breaking changes until this feature is fully supported by the adapter.
[23:40:30.636] 03:40:30 [vite] Forced re-optimization of dependencies
[23:40:31.185] 03:40:31 [types] Generated 634ms
[23:40:31.185] 03:40:31 [build] output: "server"
[23:40:31.186] 03:40:31 [build] directory: /vercel/path0/.vercel/output/
[23:40:31.186] 03:40:31 [build] adapter: @astrojs/vercel/serverless
[23:40:31.186] 03:40:31 [build] Collecting build info...
[23:40:31.186] 03:40:31 [build] ✓ Completed in 723ms.
[23:40:31.190] 03:40:31 [build] Building server entrypoints...
[23:40:32.251] 03:40:32 [WARN] [router] getStaticPaths() ignored in dynamic page /src/pages/[...page].astro. Add
export const prerender = true;
to prerender the page as static HTML during the build process.[23:40:32.252] 03:40:32 [WARN] [router] getStaticPaths() ignored in dynamic page /src/pages/archive/category/[category].astro. Add
export const prerender = true;
to prerender the page as static HTML during the build process.[23:40:32.252] 03:40:32 [WARN] [router] getStaticPaths() ignored in dynamic page /src/pages/archive/tag/[tag].astro. Add
export const prerender = true;
to prerender the page as static HTML during the build process.[23:40:34.341] 03:40:34 [WARN] [router] getStaticPaths() ignored in dynamic page /src/pages/posts/[...slug].astro. Add
export const prerender = true;
to prerender the page as static HTML during the build process.[23:40:40.989] 03:40:40 [astro-icon] Loaded icons from fa6-brands, fa6-regular, fa6-solid, material-symbols
[23:40:44.343] 03:40:44 [vite] �[32m✓ built in 13.11s�[39m
[23:40:44.344] 03:40:44 [build] ✓ Completed in 13.15s.
[23:40:44.344]
[23:40:44.344] building client (vite)
[23:40:44.366] 03:40:44 [vite] transforming...
[23:40:45.583] 03:40:45 [vite] �[32m✓�[39m 84 modules transformed.
[23:40:45.651] 03:40:45 [vite] rendering chunks...
[23:40:45.740] 03:40:45 [vite] computing gzip size...
[23:40:45.751] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[35mhoisted.CCg3F84P.css �[39m�[1m�[2m17.70 kB�[22m�[1m�[22m�[2m │ gzip: 3.70 kB�[22m
[23:40:45.752] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36murl-utils.Dlpwwa_x.js �[39m�[1m�[2m 0.26 kB�[22m�[1m�[22m�[2m │ gzip: 0.19 kB�[22m
[23:40:45.752] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mclient.Cx1FBVJX.js �[39m�[1m�[2m 0.61 kB�[22m�[1m�[22m�[2m │ gzip: 0.42 kB�[22m
[23:40:45.752] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36msetting-utils.H_x_02w0.js �[39m�[1m�[2m 0.86 kB�[22m�[1m�[22m�[2m │ gzip: 0.41 kB�[22m
[23:40:45.752] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mpreload-helper.CLcXU_4U.js �[39m�[1m�[2m 0.99 kB�[22m�[1m�[22m�[2m │ gzip: 0.60 kB�[22m
[23:40:45.752] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mSwupScriptsPlugin.o5PkFIdr.js �[39m�[1m�[2m 1.10 kB�[22m�[1m�[22m�[2m │ gzip: 0.61 kB�[22m
[23:40:45.753] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mindex.modern.CkIAsQri.js �[39m�[1m�[2m 1.76 kB�[22m�[1m�[22m�[2m │ gzip: 0.91 kB�[22m
[23:40:45.753] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mpage.DadmgFtc.js �[39m�[1m�[2m 1.86 kB�[22m�[1m�[22m�[2m │ gzip: 0.87 kB�[22m
[23:40:45.753] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mSwupHeadPlugin.D6a4jALp.js �[39m�[1m�[2m 2.28 kB�[22m�[1m�[22m�[2m │ gzip: 1.14 kB�[22m
[23:40:45.753] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mDisplaySettings.BK79NdpI.js �[39m�[1m�[2m 3.31 kB�[22m�[1m�[22m�[2m │ gzip: 1.61 kB�[22m
[23:40:45.753] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mzh_TW.CKhjGQgu.js �[39m�[1m�[2m 4.19 kB�[22m�[1m�[22m�[2m │ gzip: 1.73 kB�[22m
[23:40:45.754] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mSearch.BOMMtBY7.js �[39m�[1m�[2m 5.55 kB�[22m�[1m�[22m�[2m │ gzip: 2.47 kB�[22m
[23:40:45.754] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mSwupA11yPlugin.CbqqmqBu.js �[39m�[1m�[2m 5.97 kB�[22m�[1m�[22m�[2m │ gzip: 2.29 kB�[22m
[23:40:45.754] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mSwupPreloadPlugin.CIXicyY9.js �[39m�[1m�[2m 6.00 kB�[22m�[1m�[22m�[2m │ gzip: 2.35 kB�[22m
[23:40:45.754] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mSwupScrollPlugin.DbO9qDqe.js �[39m�[1m�[2m 8.00 kB�[22m�[1m�[22m�[2m │ gzip: 2.40 kB�[22m
[23:40:45.754] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mtranslation.DvRaJ_mQ.js �[39m�[1m�[2m 9.56 kB�[22m�[1m�[22m�[2m │ gzip: 3.85 kB�[22m
[23:40:45.754] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mSwup.ytUFgklH.js �[39m�[1m�[2m21.35 kB�[22m�[1m�[22m�[2m │ gzip: 7.29 kB�[22m
[23:40:45.755] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mLightDarkSwitch.BYmXREAb.js �[39m�[1m�[2m26.40 kB�[22m�[1m�[22m�[2m │ gzip: 10.10 kB�[22m
[23:40:45.755] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mhoisted.D4TTVZ9N.js �[39m�[1m�[2m49.61 kB�[22m�[1m�[22m�[2m │ gzip: 20.77 kB�[22m
[23:40:45.755] 03:40:45 [vite] �[2m.vercel/output/static/�[22m�[2m_astro/�[22m�[36mphotoswipe.esm.CKijkUPa.js �[39m�[1m�[2m60.42 kB�[22m�[1m�[22m�[2m │ gzip: 17.49 kB�[22m
[23:40:45.755] 03:40:45 [vite] �[32m✓ built in 1.39s�[39m
[23:40:45.780] 03:40:45
[23:40:45.781] finalizing server assets
[23:40:45.781]
[23:40:45.781] 03:40:45 [build] Rearranging server assets...
[23:40:45.797] 03:40:45 [@astrojs/sitemap]
sitemap-index.xml
created at.vercel/output/static
[23:40:45.798]
[23:40:45.798] Compress:
[23:40:45.961] (-45 Bytes) 1.36% reduction in //output/static/_astro/DisplaySettings.BK79NdpI.js
[23:40:46.448] (-68 Bytes) 0.26% reduction in //output/static/_astro/LightDarkSwitch.BYmXREAb.js
[23:40:46.516] (-30 Bytes) 0.54% reduction in //output/static/_astro/Search.BOMMtBY7.js
[23:40:46.784] (-NaN undefined) -0.43% reduction in //output/static/_astro/Swup.ytUFgklH.js
[23:40:46.833] (-NaN undefined) -0.02% reduction in //output/static/_astro/SwupA11yPlugin.CbqqmqBu.js
[23:40:46.858] (-NaN undefined) -0.61% reduction in //output/static/_astro/SwupHeadPlugin.D6a4jALp.js
[23:40:46.933] (-NaN undefined) -0.60% reduction in //output/static/_astro/SwupPreloadPlugin.CIXicyY9.js
[23:40:46.963] (-NaN undefined) -0.09% reduction in //output/static/_astro/SwupScriptsPlugin.o5PkFIdr.js
[23:40:47.019] (-NaN undefined) -0.11% reduction in //output/static/_astro/SwupScrollPlugin.DbO9qDqe.js
[23:40:47.030] (-5 Bytes) 0.82% reduction in //output/static/_astro/client.Cx1FBVJX.js
[23:40:47.532] (-395 Bytes) 0.80% reduction in //output/static/_astro/hoisted.D4TTVZ9N.js
[23:40:47.554] (-NaN undefined) -0.34% reduction in //output/static/_astro/index.modern.CkIAsQri.js
[23:40:47.578] (-NaN undefined) -1.94% reduction in //output/static/_astro/page.DadmgFtc.js
[23:40:47.893] (-25 Bytes) 0.04% reduction in //output/static/_astro/photoswipe.esm.CKijkUPa.js
[23:40:47.901] (-NaN undefined) -1.02% reduction in //output/static/_astro/preload-helper.CLcXU_4U.js
[23:40:47.916] (-11 Bytes) 1.28% reduction in //output/static/_astro/setting-utils.H_x_02w0.js
[23:40:47.974] (-NaN undefined) -0.18% reduction in //output/static/_astro/translation.DvRaJ_mQ.js
[23:40:47.978] (-15 Bytes) 5.84% reduction in //output/static/_astro/url-utils.Dlpwwa_x.js
[23:40:47.993] (-1 Bytes) 0.02% reduction in //output/static/_astro/zh_TW.CKhjGQgu.js
[23:40:47.994] ✅ Successfully compressed a total of 19 JavaScript files for 373 Bytes.
[23:40:47.997] 03:40:47 [@astrojs/vercel/serverless] Bundling function ../../_functions/entry.mjs
[23:40:50.745] 03:40:50 [build] Server built in 20.28s
[23:40:50.745] 03:40:50 [build] Complete!
[23:40:50.860]
[23:40:50.861] Running Pagefind v1.1.1 (Extended)
[23:40:50.861] Running from: "/vercel/path0"
[23:40:50.861] Source: "dist"
[23:40:50.861] Output: "dist/pagefind"
[23:40:50.861]
[23:40:50.861] [Walking source directory]
[23:40:50.863] Found 0 files matching **/*.{html}
[23:40:50.863]
[23:40:50.863] [Parsing files]
[23:40:50.863] Did not find a data-pagefind-body element on the site.
[23:40:50.863] ↳ Indexing all elements on the site.
[23:40:50.863]
[23:40:50.863] [Reading languages]
[23:40:50.863] Discovered 0 languages:
[23:40:50.863]
[23:40:50.863] [Building search indexes]
[23:40:50.863] Total:
[23:40:50.863] Indexed 0 languages
[23:40:50.864] Indexed 0 pages
[23:40:50.864] Indexed 0 words
[23:40:50.864] Indexed 0 filters
[23:40:50.864] Indexed 0 sorts
[23:40:50.864] Error: Pagefind wasn't able to build an index.
[23:40:50.864] Most likely, the directory passed to Pagefind was empty or did not contain any html files.
[23:40:50.869] ELIFECYCLE Command failed with exit code 1.
[23:40:50.884] Error: Command "pnpm run build" exited with 1
[23:40:51.989]
But what about when I run pnpm build in Git Bash?
The error:
ENOENT: no such file or directory, mkdir 'C:\Users\Admin\Desktop\fuwari\.vercel\output\functions\_render.func\node_modules\.pnpm\[email protected]\node_modules\htmlparser2' Stack trace: at async Module.mkdir (node:internal/fs/promises:858:10) at async copyDependenciesToFunction (file:///C:/Users/Admin/desktop/fuwari/node_modules/.pnpm/@[email protected][email protected]_@[email protected][email protected][email protected]_sass@_td3swh5ijkcosjjvzsj5jwbyz4/node_modules/@astrojs/vercel/dist/lib/nft.js:50:28) at async astro:build:done (file:///C:/Users/Admin/desktop/fuwari/node_modules/.pnpm/@[email protected][email protected]_@[email protected][email protected][email protected]_sass@_td3swh5ijkcosjjvzsj5jwbyz4/node_modules/@astrojs/vercel/dist/serverless/adapter.js:228:25) at async runHookBuildDone (file:///C:/Users/Admin/desktop/fuwari/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]_t_4yzr7ra5bqlskvdaeoosra5nku/node_modules/astro/dist/integrations/hooks.js:428:7) at async AstroBuilder.run (file:///C:/Users/Admin/desktop/fuwari/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]_t_4yzr7ra5bqlskvdaeoosra5nku/node_modules/astro/dist/core/build/index.js:182:7) ELIFECYCLE Command failed with exit code 1.
When trying to run in a local environment (using pnpm dev)
TypeError: Cannot read properties of undefined (reading 'data') at C:\Users\Admin\Desktop\fuwari\src\pages\[...page].astro:17:18 at [...page] (C:\Users\Admin\Desktop\fuwari\node_modules\.pnpm\[email protected]_@[email protected][email protected][email protected][email protected][email protected]_t_4yzr7ra5bqlskvdaeoosra5nku\node_modules\astro\dist\runtime\server\astro-component.js:16:12) at callComponentAsTemplateResultOrResponse (file:///C:/Users/Admin/desktop/fuwari/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]_t_4yzr7ra5bqlskvdaeoosra5nku/node_modules/astro/dist/runtime/server/render/astro/render.js:90:31) at renderToAsyncIterable (file:///C:/Users/Admin/desktop/fuwari/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]_t_4yzr7ra5bqlskvdaeoosra5nku/node_modules/astro/dist/runtime/server/render/astro/render.js:132:32) at renderPage (file:///C:/Users/Admin/desktop/fuwari/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]_t_4yzr7ra5bqlskvdaeoosra5nku/node_modules/astro/dist/runtime/server/render/page.js:31:30) at lastNext (file:///C:/Users/Admin/desktop/fuwari/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]_t_4yzr7ra5bqlskvdaeoosra5nku/node_modules/astro/dist/core/render-context.js:132:31) at async callMiddleware (file:///C:/Users/Admin/desktop/fuwari/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]_t_4yzr7ra5bqlskvdaeoosra5nku/node_modules/astro/dist/core/middleware/callMiddleware.js:11:10) at async RenderContext.render (file:///C:/Users/Admin/desktop/fuwari/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]_t_4yzr7ra5bqlskvdaeoosra5nku/node_modules/astro/dist/core/render-context.js:163:22) at async handleRoute (file:///C:/Users/Admin/desktop/fuwari/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]_t_4yzr7ra5bqlskvdaeoosra5nku/node_modules/astro/dist/vite-plugin-astro-server/route.js:145:16) at async run (file:///C:/Users/Admin/desktop/fuwari/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]_t_4yzr7ra5bqlskvdaeoosra5nku/node_modules/astro/dist/vite-plugin-astro-server/request.js:40:14)
Beta Was this translation helpful? Give feedback.
All reactions