Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of the box experience leads to "Error: No target found" #5

Open
irbull opened this issue Sep 20, 2022 · 5 comments
Open

Out of the box experience leads to "Error: No target found" #5

irbull opened this issue Sep 20, 2022 · 5 comments

Comments

@irbull
Copy link

irbull commented Sep 20, 2022

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.

@oscarotero
Copy link
Member

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?

@irbull
Copy link
Author

irbull commented Sep 20, 2022

Deno 1.25.3
exit using ctrl+d or close()
> Deno.build
{
  target: "aarch64-apple-darwin",
  arch: "aarch64",
  os: "darwin",
  vendor: "apple",
  env: undefined
}

@irbull
Copy link
Author

irbull commented Sep 20, 2022

Ah, looks like it's related to the Mac M1 (arm) architecture.

@oscarotero
Copy link
Member

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.

@oscarotero
Copy link
Member

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.

oscarotero added a commit to lumeland/experimental-plugins that referenced this issue Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants