我对 aws amplify 还很陌生,并且有一个 amplify 应用程序,它有一个后端 lambda 函数,该函数使用Sharp作为依赖项。当我推送 git 来触发部署时,我的构建失败了,我认为是由于vips/vips8没有找到尖锐的依赖关系。
相关日志
2022-05-31T18:26:18.714Z [INFO]: [0mError: Packaging lambda function failed with the error [0m
[0mCommand failed with exit code 1: npm install --no-bin-links --production[0m
[0msh: prebuild-install: command not found[0m
[0m../src/common.cc:24:10: fatal error: vips/vips8: [0m
[0m #include <vips/vips8>[0m
[0m ^~~~~~~~~~~~[0m
[0mcompilation terminated.[0m
[0mmake: *** [Release/obj.target/sharp-linux-x64/src/common.o] Error 1[0m
[0mgyp ERR! build error [0m
[0mgyp ERR! stack Error: `make` failed with exit code: 2[0m
[0mgyp ERR! stack at ChildProcess.onExit (/root/.nvm/versions/node/v14.19.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)[0m
[0mgyp …Run Code Online (Sandbox Code Playgroud)