-
-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
Hello ~
I'm trying to run assetpack, but I'm encountering the following error:
Error: Could not load the "sharp" module using the darwin-arm64 runtime
Has anyone else experienced this issue?
System: Apple M1 Max
node : v22.15.1
Package manager: yarn
code
const { json } = require('@assetpack/core/json');
const { pixiManifest } = require('@assetpack/core/manifest');
const { texturePacker } = require('@assetpack/core/texture-packer');
module.exports = {
entry: './raw-assets',
output: './public/match3/assets/',
cache: true,
plugins: {
json: json(),
texturePacker: texturePacker({
texturePacker: {
removeFileExtension: true,
},
}),
pixiManifest: pixiManifest({
output: './public/match3/assets/assets-manifest.json',
}),
},
};
package.json
scripts:{
...
"assets": "assetpack",
}
cli
yarn assets
Error: Could not load the "sharp" module using the darwin-arm64 runtime
ERR_DLOPEN_FAILED: dlopen(/Users/toss.nbsp3/Desktop/frontend-mobile/.yarn/unplugged/@img-sharp-darwin-arm64-npm-0.34.3-aae42bf312/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node, 0x0001): Library not loaded: @rpath/libvips-cpp.8.17.1.dylib
Referenced from: <51D8C333-7EBD-3192-A248-41D5C994E314> /Users/toss.nbsp3/Desktop/frontend-mobile/.yarn/unplugged/@img-sharp-darwin-arm64-npm-0.34.3-aae42bf312/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node
Reason: tried: '/Users/toss.nbsp3/Desktop/frontend-mobile/.yarn/unplugged/@img-sharp-darwin-arm64-npm-0.34.3-aae42bf312/node_modules/@img/sharp-darwin-arm64/lib/../../sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.1.dylib' (no such file), '/Users/toss.nbsp3/Desktop/frontend-mobile/.yarn/unplugged/@img-sharp-darwin-arm64-npm-0.34.3-aae42bf312/node_modules/@img/sharp-darwin-arm64/lib/../../../sharp-libvips-darwin-arm64/1.2.0/lib/libvips-cpp.8.17.1.dylib' (no such file), '/Users/toss.nbsp3/Desktop/frontend-mobile/.yarn/unplugged/@img-sharp-darwin-arm64-npm-0.34.3-aae42bf312/node_modules/@img/sharp-darwin-arm64/lib/../../node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.1.dylib' (no such file), '/Users/toss.nbsp3/Desktop/frontend-mobile/.yarn/unplugged/@img-sharp-darwin-arm64-npm-0.34.3-aae42bf312/node_modules/@img/sharp-darwin-arm64/lib/../../../node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.1.dylib' (no such file), '/Users/toss.nbsp3/Desktop/frontend-mobile/.yarn/unplugged/@img-sharp-darwin-arm64-npm-0.34.3-aae42bf312/node_modules/@img/sharp-darwin-arm64/lib/../../../../../@img-sharp-libvips-darwin-arm64-npm-1.2.0-2d65006be7/node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.1.dylib' (no such file), '/Users/toss.nbsp3/Desktop/frontend-mobile/.yarn/unplugged/@img-sharp-darwin-arm64-npm-0.34.3-aae42bf312/node_modules/@img/sharp-darwin-arm64/lib/../../sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.1.dylib' (no such file), '/Users/toss.nbsp3/Desktop/frontend-mobile/.yarn/unplugged/@img-sharp-darwin-arm64-npm-0.34.3-aae42bf312/node_modules/@img/sharp-darwin-arm64/lib/../../../sharp-libvips-darwin-arm64/1.2.0/lib/libvips-cpp.8.17.1.dylib' (no such file), '/Users/toss.nbsp3/Desktop/frontend-mobile/.yarn/unplugged/@img-sharp-darwin-arm64-npm-0.34.3-aae42bf312/node_modules/@img/sharp-darwin-arm64/lib/../../node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.1.dylib' (no such file), '/Users/toss.nbsp3/Desktop/frontend-mobile/.yarn/unplugged/@img-sharp-darwin-arm64-npm-0.34.3-aae42bf312/node_modules/@img/sharp-darwin-arm64/lib/../../../node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.1.dylib' (no such file), '/Users/toss.nbsp3/Desktop/frontend-mobile/.yarn/unplugged/@img-sharp-darwin-arm64-npm-0.34.3-aae42bf312/node_modules/@img/sharp-darwin-arm64/lib/../../../../../@img-sharp-libvips-darwin-arm64-npm-1.2.0-2d65006be7/node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.1.dylib' (no such file)
Possible solutions:
- Ensure optional dependencies can be installed:
npm install --include=optional sharp
- Ensure your package manager supports multi-platform installation:
See https://sharp.pixelplumbing.com/install#cross-platform
- Add platform-specific dependencies:
npm install --os=darwin --cpu=arm64 sharp
- Consult the installation documentation:
See https://sharp.pixelplumbing.com/install
tomtiao
Metadata
Metadata
Assignees
Labels
No labels