我有一台新电脑,安装了 Ubuntu 22.04,并且刚刚安装了节点 18.18。
现在我正在尝试安装包含 Sharp 的项目的软件包,但收到此错误:
npm ERR! code 7
npm ERR! path /home/enoch/workspace/modernminds-ic/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! A complete log of this run can be found in: /home/enoch/.npm/_logs/2023-10-22T07_41_53_966Z-debug-0.log
Sharp 运行需要安装某些工具的安装后脚本。您很可能缺少一些依赖项,例如 node-gyp 的 python。