-
Notifications
You must be signed in to change notification settings - Fork 276
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
Symbolic links dont get put in zip file #124
Comments
Note: I was able to get it to work by replacing the symbolic links with copies |
Thanks for reporting this. I've investigated the issue and it seems that the dependent library we use (node-archiver) does not support symlinks yet. They will start will start supporting symlinks in the next major version (archiverjs/node-archiver#243), so when that gets released we can update claudia. Fixing this now would require either changing the library to use for producing the zip files, or contributing upstream to the node archiver and implementing support for symbolic links. Both are too much work for me to pursue now. If you'd like to contribute, this is the function that needs to change: https://github.com/claudiajs/claudia/blob/master/src/tasks/zipdir.js -- please submit a pull request and I'll merge it. Including symbolic links should be an option rather than something forced, to avoid system libraries being linked in by mistake. (eg check out serverless/serverless#3215) |
archiver/node-archiver#243 has cleared with support for symlinks and archiver package has bumped up to version 2.0.0. |
Great thanks guys.
…On Fri, Jul 7, 2017 at 1:54 PM, Cameron Kelley ***@***.***> wrote:
archiver/node-archiver#243 has cleared with support for symlinks and
node-archiver has bumped up to version 2.0.0.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#124 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADV4McMrsvd-1SRXfqOAQ7oF1Wj53miMks5sLpr2gaJpZM4OCsky>
.
|
This bug should be re-opened because node-archiver still does not handle symlinks correctly and, therefore, claudiajs doesn't create packages with valid symlinks. |
It's not node-archiver, it's because of |
Is the issue being tracked someplace? There still seems to be a fix for a bug in node-archiver that hasn't been released yet: archiverjs/node-archiver#293 |
as a workaround, I used a postinstall script in npm: "postinstall": "find node_modules/ -type l -exec sed -i '' {} ';'" the sed method was adapted from here: https://stackoverflow.com/questions/7167424/replace-all-symlinks-with-original |
can we handle symlinks now? looks like no – still get the error. |
Please use GitHub issues only to report bugs. To ask a general question or request assistance/support, please use the Claudia.js Gitter Chat instead.
To report a bug or a problem, please fill in the sections below. The more you provide, the better we'll be able to help.
Expected behaviour:
Recently when trying to use claudia to deploy a sharp project to aws lambda, i came across some behavior that i didn't expect. When zipping dependencies, claudia doesn't seem to package symbolic links. node_modules/sharp/vendors/ relies heavily on symbolic links and therefore could not run when being deployed with claudia (without manual alterations to the dependencies.) I expect these symbolic links should be uploaded.
What actually happens: symbolic links do not get put into the zip file.
Link to a minimal, executable project that demonstrates the problem:
using claudia to deploy https://github.com/awslabs/serverless-image-resizing
Steps to install the project:
Steps to reproduce the problem:
if you package https://github.com/awslabs/serverless-image-resizing with claudia, node_modules/sharp/vendor/libvipps.so.42 will not be in the upload and therefore the lambda function will not run.
The text was updated successfully, but these errors were encountered: