New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems creating sharp Lambda layer package with custom libvips #4081
Comments
Did you see https://github.com/zoellner/sharp-heic-lambda-layer ? |
Thanks for the prompt answer. It was just updated using the latest versions...I'll try it out; even though the compile steps are very similar to mine. Will update this ticket when I confirm it works. |
Unfortunately, the Lambda layer from the other project seems not to work. The error I am getting is below.
I created a ticket there (zoellner/sharp-heic-lambda-layer#30); maybe the issue with building both Lambda layers is related. |
Is there any documentation on which exact files are needed at runtime after the compilation from source is done? |
@zoellner You can use $ ldd node_modules/sharp/src/build/Release/sharp-linux-x64.node |
@lovell got it fixed. The issue for me was related to a wrong preset during the libheif compilation. Code is available here: https://github.com/Dobe-Solutions/sharp-heif-lambda-layer |
Possible install-time or require-time problem
You must confirm both of these before continuing.
Are you using the latest version of sharp?
sharp
as reported bynpm view sharp dist-tags.latest
.If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.
If you are using another package which depends on a version of
sharp
that is not the latest,please open an issue against that package instead.
Are you using a supported runtime?
^18.17.0 || ^20.3.0 || >=21.0.0
If you cannot confirm any of these,
please upgrade to the latest version
and try again before opening an issue.
Are you using a supported package manager and installing optional dependencies?
--include=optional
--no-optional=false
If you cannot confirm any of these, please upgrade to the latest version of your chosen package manager
and ensure you are allowing the installation of optional or multi-platform dependencies before opening an issue.
What is the complete error message, including the full stack trace?
What is the complete output of running
npm install --verbose --foreground-scripts sharp
in an empty directory?output.log
What is the output of running
npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
?The problem
I am not sure if that is the right place to ask, please let me know if this is more related to libvips or something else.
The error above is happening when running sharp in a Lambda layer to convert a HEIC file into a JPG.
I am compiling libde265, libheif, libwebp, libvips to use with sharp in a custom Docker container. Installing sharp and running it there works well with HEIC files. My goal is to generate a zip file with all dependencies for a Lambda layer.
The below code is installing sharp, copying the libraries and zipping all together for use in a Lambda layer.
I assume the issue is related to dynamically linked libraries; though the error message from sharp seems to indicate that libvips has not been compiled with libheif.
Any help or hint into the right direction would be greatly appreciated.
The text was updated successfully, but these errors were encountered: