Closed brycewray closed 2 years ago
Hi @brycewray — this looks like a npm version < 7 🙂 They added the manual yes prompt (and thus the -y
) flag in v7. (I should clarify the npm version in the docs)
Quickest solution is to change to npm_config_yes=true npx pagefind --source "public"
which is slightly more verbose but will set the environment variable for v7 and be silently ignored for v6 🙂
Hi @brycewray — this looks like a npm version < 7 🙂 They added the manual yes prompt (and thus the
-y
) flag in v7. (I should clarify the npm version in the docs)Quickest solution is to change to
npm_config_yes=true npx pagefind --source "public"
which is slightly more verbose but will set the environment variable for v7 and be silently ignored for v6 🙂
@bglw Thanks for that info!
During a test today, I was mirroring my Cloudflare Pages site on Vercel. I followed the build command (a shell script, so as to install the Embedded Dart Sass binary in the PATH) with
&& npx pagefind -y --source "public"
. The rest of the build went normally, but the attempt to run Pagefind didn’t work. This is the relevant segment from the deployment log:By comparison: my normal deployment process to Cloudflare Pages involves a GitHub Action which first installs/builds Hugo and then runs Pagefind with
npx -y pagefind --source "public"
— so I’m not sure why this didn’t work with Vercel, but thought the log excerpt might be of value.