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

Support win on arm64 #4135

Closed
Daydreamer-riri opened this issue Jun 26, 2024 · 1 comment
Closed

Support win on arm64 #4135

Daydreamer-riri opened this issue Jun 26, 2024 · 1 comment

Comments

@Daydreamer-riri
Copy link

Feature request

What are you trying to achieve?

Support win on arm64.

Please provide sample image(s) that help explain this feature

I'm running into this issue:

C:\Users\Riri\workspace\riri\riri-me\node_modules\.pnpm\[email protected]\node_modules\sharp\lib\sharp.js:114
  throw new Error(help.join('\n'));
        ^

Error: Could not load the "sharp" module using the win32-arm64 runtime
Possible solutions:
- Manually install libvips >= 8.15.2
- Add experimental WebAssembly-based dependencies:
    npm install --cpu=wasm32 sharp
    npm install @img/sharp-wasm32
- Consult the installation documentation:
    See https://sharp.pixelplumbing.com/install
    at Object.<anonymous> (C:\Users\Riri\workspace\riri\riri-me\node_modules\.pnpm\[email protected]\node_modules\sharp\lib\sharp.js:114:9)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Module._load (node:internal/modules/cjs/loader:1024:12)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (C:\Users\Riri\workspace\riri\riri-me\node_modules\.pnpm\[email protected]\node_modules\sharp\lib\constructor.js:10:1)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Module._load (node:internal/modules/cjs/loader:1024:12)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (C:\Users\Riri\workspace\riri\riri-me\node_modules\.pnpm\[email protected]\node_modules\sharp\lib\index.js:6:15)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Module._load (node:internal/modules/cjs/loader:1024:12)
    at cjsLoader (node:internal/modules/esm/translators:348:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:297:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
    at async generatePage (file:///C:/Users/Riri/workspace/riri/riri-me/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/astro/dist/core/build/generate.js:204:22)
    at async generatePages (file:///C:/Users/Riri/workspace/riri/riri-me/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/astro/dist/core/build/generate.js:164:9)
    at async staticBuild (file:///C:/Users/Riri/workspace/riri/riri-me/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/astro/dist/core/build/static-build.js:96:7)
    at async AstroBuilder.build (file:///C:/Users/Riri/workspace/riri/riri-me/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/astro/dist/core/build/index.js:134:5)
    at async AstroBuilder.run (file:///C:/Users/Riri/workspace/riri/riri-me/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/astro/dist/core/build/index.js:165:7)
    at async build (file:///C:/Users/Riri/workspace/riri/riri-me/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/astro/dist/core/build/index.js:46:3)
    at async build (file:///C:/Users/Riri/workspace/riri/riri-me/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/astro/dist/cli/build/index.js:20:3)
    at async runCommand (file:///C:/Users/Riri/workspace/riri/riri-me/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/astro/dist/cli/index.js:141:7)
    at async cli (file:///C:/Users/Riri/workspace/riri/riri-me/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/astro/dist/cli/index.js:169:5)

Node.js v20.15.0

I guess it could be that Sharp doesn't support Win On Arm? Or is there another solution?

@lovell
Copy link
Owner

lovell commented Jun 27, 2024

There's an existing issue for this at lovell/sharp-libvips#238 - let's track it there.

In the meantime, you could try the WebAssembly binaries - https://sharp.pixelplumbing.com/install#webassembly

@lovell lovell closed this as completed Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants