LoginSignup
0
1

More than 1 year has passed since last update.

Apple Silicon Macでsharpが動かない

Posted at

エラー内容


~/pianoroll-master/pianoroll/node_modules/sharp/lib/sharp.js:37
  throw new Error(help.join('\n'));
  ^

Error: 
Something went wrong installing the "sharp" module

dlopen(/Users/ryohorie/Downloads/pianoroll-master/pianoroll/node_modules/sharp/build/Release/sharp-darwin-arm64v8.node, 0x0001): symbol not found in flat namespace '__ZTVN4vips7VOptionE'

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/ryohorie/Downloads/pianoroll-master/pianoroll/node_modules/sharp/lib/sharp.js:37:9)
    at Module._compile (node:internal/modules/cjs/loader:1155:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
    at Module.load (node:internal/modules/cjs/loader:1033:32)
    at Function.Module._load (node:internal/modules/cjs/loader:868:12)
    at Module.require (node:internal/modules/cjs/loader:1057:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/Users/ryohorie/Downloads/pianoroll-master/pianoroll/node_modules/sharp/lib/constructor.js:11:1)
    at Module._compile (node:internal/modules/cjs/loader:1155:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)

解決

brew remove vips
npm uninstall sharp
npm install sharp

参考
https://github.com/lovell/sharp/issues/2588

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1