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

Building on ARM #8

Open
huyz opened this issue Feb 7, 2025 · 0 comments
Open

Building on ARM #8

huyz opened this issue Feb 7, 2025 · 0 comments

Comments

@huyz
Copy link

huyz commented Feb 7, 2025

Can anyone get this to build on macOS Apple Silicon (or on Linux ARM)?

No matter what I do, when I run pnpm dev or pnpm build, I end up with:

❯ pnpm dev

> [email protected] dev /Users/huy/git/+dot/under-new-management
> plasmo dev

/Users/huy/git/+dot/under-new-management/node_modules/.pnpm/[email protected]/node_modules/sharp/lib/sharp.js:37
  throw new Error(help.join('\n'));
        ^

Error: 
Something went wrong installing the "sharp" module

Cannot find module '../build/Release/sharp-darwin-arm64v8.node'
Require stack:
- /Users/huy/git/+dot/under-new-management/node_modules/.pnpm/[email protected]/node_modules/sharp/lib/sharp.js
- /Users/huy/git/+dot/under-new-management/node_modules/.pnpm/[email protected]/node_modules/sharp/lib/constructor.js
- /Users/huy/git/+dot/under-new-management/node_modules/.pnpm/[email protected]/node_modules/sharp/lib/index.js

Possible solutions:
- Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose sharp"
- Install for the current darwin-arm64v8 runtime: "npm install --platform=darwin --arch=arm64v8 sharp"
- Consult the installation documentation: https://sharp.pixelplumbing.com/install
    at Object.<anonymous> (/Users/huy/git/+dot/under-new-management/node_modules/.pnpm/[email protected]/node_modules/sharp/lib/sharp.js:37:9)
    at Module._compile (node:internal/modules/cjs/loader:1546:14)
    at Object..js (node:internal/modules/cjs/loader:1689:10)
    at Module.load (node:internal/modules/cjs/loader:1318:32)
    at Function._load (node:internal/modules/cjs/loader:1128:12)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
    at Module.require (node:internal/modules/cjs/loader:1340:12)
    at require (node:internal/modules/helpers:141:16)
    at Object.<anonymous> (/Users/huy/git/+dot/under-new-management/node_modules/.pnpm/[email protected]/node_modules/sharp/lib/constructor.js:11:1)

Node.js v22.11.0

I've tried the above suggestions already.


I was finally able to build by dropping pnpm altogether and using npm instead.

@huyz huyz changed the title Building on macOS ARM Building on ARM Feb 7, 2025
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

1 participant