CloudCannon / pagefind

Static low-bandwidth search at scale
https://pagefind.app
MIT License
3.23k stars 99 forks source link

Cannot install on Windows #528

Closed oscarotero closed 4 months ago

oscarotero commented 7 months ago

Hi. I'm trying to install pagefind in a windows computer (using the Lume plugin) but get this error:

Error: Failed to install either of [pagefind_extended, pagefind]. Most likely the platform windows-x64 is not yet a supported architecture.
Please open an issue at https://github.com/CloudCannon/pagefind and paste this error message in full.
If you believe this package should be compatible with your system,
you can try downloading a release binary directly from https://github.com/CloudCannon/pagefind/releases
    at resolveBinaryPath (file:///C:/Users/laura/AppData/Local/deno/npm/registry.npmjs.org/pagefind/1.0.4/lib/resolveBinary.js:28:11)
    at new PagefindService (file:///C:/Users/laura/AppData/Local/deno/npm/registry.npmjs.org/pagefind/1.0.4/lib/service.js:22:44)
    at launch (file:///C:/Users/laura/AppData/Local/deno/npm/registry.npmjs.org/pagefind/1.0.4/lib/index.js:15:29)
    at file:///C:/Users/laura/AppData/Local/deno/npm/registry.npmjs.org/pagefind/1.0.4/lib/index.js:50:5
    at new Promise (<anonymous>)
    at Module.createIndex (file:///C:/Users/laura/AppData/Local/deno/npm/registry.npmjs.org/pagefind/1.0.4/lib/index.js:44:40)
    at https://deno.land/x/lume@v2.0.0/plugins/pagefind.ts:135:40
    at Processors.run (https://deno.land/x/lume@v2.0.0/core/processors.ts:31:13)
    at eventLoopTick (ext:core/01_core.js:178:11)
    at async Site.#buildPages (https://deno.land/x/lume@v2.0.0/core/site.ts:638:5)

It's weird because the package exists: https://www.npmjs.com/package/@pagefind/windows-x64

bglw commented 7 months ago

👋 hey @oscarotero

Hmm, might need more details to dig in. Testing on Node 18 on Windows I'm not seeing any issues, both through npm i pagefind & the NodeJS API, as well as the npx pagefind wrapper flow.

Due to the way this is installed as an optionalDependency, this can happen if that install fails for whatever reason and NPM silently moves on. Or in this case, Deno could once again be causing an issue with optional / target architecture dependencies? I'll get Deno up and running on a Windows machine to test that...

bglw commented 7 months ago

I'll note yesterday's Deno release has the changelog item:

Perhaps the system check that Deno is running isn't matching the dependency correctly, and is now being filtered out?

oscarotero commented 7 months ago

Hi Liam! Thanks for the quick response (and sorry for my delay). Okay, I'll check different Deno versions and will let you know.

oscarotero commented 4 months ago

Hi. Sorry for taking so long to answer. 🙏

Today I could test again pagefind with Deno on a Windows machine and works fine. Maybe it was a bug from Deno that was fixed in next versions, I don't know.

Anyway, it's fixed, so I can close this. Thanks!