You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
08:58:38.896 | npm WARN exec The following package was not found and will be installed: pagefind
08:58:40.547 | error: Found argument '-y' which wasn't expected, or isn't valid in this context
08:58:40.548 |
08:58:40.548 | If you tried to supply `-y` as a value rather than a flag, use `-- -y`
08:58:40.548 |
08:58:40.548 | USAGE:
08:58:40.548 | pagefind_extended [OPTIONS]
08:58:40.548 |
08:58:40.548 | For more information try --help
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.
The text was updated successfully, but these errors were encountered:
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 🙂
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.The text was updated successfully, but these errors were encountered: