base-blog
base-blog copied to clipboard
Out of the box experience leads to "Error: No target found"
If you follow the steps in the README:
- Install Deno
- Clone this repo
- run
deno task serve
The system errors out with:
Error: No target found
at downloadBin (https://deno.land/x/[email protected]/mod.ts:71:11)
at async downloadBinary (https://raw.githubusercontent.com/lumeland/experimental-plugins/main/pagefind/deps.ts:4:10)
at async (https://raw.githubusercontent.com/lumeland/experimental-plugins/main/pagefind/mod.ts:115:22)
at async Events.dispatchEvent (https://deno.land/x/[email protected]/core/events.ts:49:11)
at async Site.build (https://deno.land/x/[email protected]/core/site.ts:486:5)
at async build (https://deno.land/x/[email protected]/cli/build.ts:36:3)
at async Command.execute (https://deno.land/x/[email protected]/command/command.ts:1433:7)
at async (https://deno.land/x/[email protected]/cli.ts:182:3)
The docs suggest configuring _config.js
, but I'm not sure what to adjust. This error appears related to pageFind
, because if I remove that configuration then the serve works.
It looks like pagefind cannot find a binary file for your computer. The pagefind plugin download one of the files of the release assets: https://github.com/CloudCannon/pagefind/releases/tag/v0.8.1 These are the possible targets: https://github.com/lumeland/experimental-plugins/blob/main/pagefind/deps.ts#L9-L11
Please, run deno
in your terminal and then typeDeno.build
. What it returns?
Deno 1.25.3
exit using ctrl+d or close()
> Deno.build
{
target: "aarch64-apple-darwin",
arch: "aarch64",
os: "darwin",
vendor: "apple",
env: undefined
}
Ah, looks like it's related to the Mac M1 (arm) architecture.
Ok, understood.
Does the x86_64 architecture work on Mac M1?
You can download the binary https://github.com/CloudCannon/pagefind/releases/tag/v0.8.1 and save it into _bin/pagefind
. And then run lume blog.
If it works fine, I'll change the plugin to download the same binary for all macOS.
It looks like the npm package returns the same binary for all darwin architectures: https://github.com/CloudCannon/pagefind/blob/84d5941afeaf4e3bfc85cb369a762f01b931c5c0/wrappers/node/lib/postinstall.js#L39 I'll fix that.