Ignite Boilerplate Npx 命令:安装“sharp”模块时出错

问题描述 投票:0回答:1

我试图使用 ignite 样板启动一个存储库,但我遇到了这个问题

npx ignite-cli@latest new PizzaApp
/Users/matthys/.npm/_npx/bec2839915ba8fc3/node_modules/gluegun/build/index.js:15
    throw up;
    ^

Error:
Something went wrong installing the "sharp" module

dlopen(/Users/matthys/.npm/_npx/bec2839915ba8fc3/node_modules/sharp/build/Release/sharp-darwin-arm64v8.node, 0x0001): Library not loaded: /opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib
  Referenced from: <DFEFCAE4-E53D-305B-836A-820C29C414B6> /opt/homebrew/Cellar/libxml2/2.11.5/lib/libxml2.2.dylib
  Reason: tried: '/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file)

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/matthys/.npm/_npx/bec2839915ba8fc3/node_modules/sharp/lib/sharp.js:34:9)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/Users/matthys/.npm/_npx/bec2839915ba8fc3/node_modules/sharp/lib/constructor.js:8:1)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)

Node.js v21.3.0

我已经尝试过终端中提到的所有解决方案。 并且在互联网上找不到有效的解决方案。

有人面临同样的问题吗?或者有人找到解决办法了吗?

npm module node-modules npx sharp
1个回答
0
投票

已用

Brew upgrade
🫡修复。

© www.soinside.com 2019 - 2024. All rights reserved.