Skip to content
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

Latest released v2.0.3 as-is, I'm getting this. #63

Closed
bs-thomas opened this issue May 4, 2020 · 8 comments
Closed

Latest released v2.0.3 as-is, I'm getting this. #63

bs-thomas opened this issue May 4, 2020 · 8 comments

Comments

@bs-thomas
Copy link
Contributor

Seems like there are issues with the sharp libraries.

2020-05-04T16:48:05.710Z	undefined	ERROR	Uncaught Exception 	
{
    "errorType": "Error",
    "errorMessage": "\nSomething went wrong installing the \"sharp\" module\n\n/opt/nodejs/node_modules/sharp/build/Release/../../vendor/lib/libvips-cpp.so.42: file too short\n\n- Remove the \"node_modules/sharp\" directory then run\n  \"npm install --ignore-scripts=false --verbose\" and look for errors\n- Consult the installation documentation at https://sharp.pixelplumbing.com/install\n- Search for this error at https://github.com/lovell/sharp/issues\n",
    "stack": [
        "Error: ",
        "Something went wrong installing the \"sharp\" module",
        "",
        "/opt/nodejs/node_modules/sharp/build/Release/../../vendor/lib/libvips-cpp.so.42: file too short",
        "",
        "- Remove the \"node_modules/sharp\" directory then run",
        "  \"npm install --ignore-scripts=false --verbose\" and look for errors",
        "- Consult the installation documentation at https://sharp.pixelplumbing.com/install",
        "- Search for this error at https://github.com/lovell/sharp/issues",
        "",
        "    at Object.<anonymous> (/opt/nodejs/node_modules/sharp/lib/constructor.js:34:9)",
        "    at Module._compile (internal/modules/cjs/loader.js:1158:30)",
        "    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)",
        "    at Module.load (internal/modules/cjs/loader.js:1002:32)",
        "    at Function.Module._load (internal/modules/cjs/loader.js:901:14)",
        "    at Module.require (internal/modules/cjs/loader.js:1044:19)",
        "    at require (internal/modules/cjs/helpers.js:77:18)",
        "    at Object.<anonymous> (/opt/nodejs/node_modules/sharp/lib/index.js:3:15)",
        "    at Module._compile (internal/modules/cjs/loader.js:1158:30)",
        "    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)"
    ]
}
@Mosnar
Copy link
Collaborator

Mosnar commented May 4, 2020

Hmm, strange. Worked while I was testing it. Will figure it out today.

@bs-thomas
Copy link
Contributor Author

That should explain it. I still haven't tested it, but already excited after getting my downloaded copy, and sls deploying this!

image

@bs-thomas
Copy link
Contributor Author

@Mosnar And it works...

@bs-thomas
Copy link
Contributor Author

bs-thomas commented May 4, 2020

@Mosnar By the way, on the side note (somewhat related)...

Are these supposed to be changed from:
lambdaLayers/SharpLayer/lib/libvips.so.42.11.0
lambdaLayers/SharpLayer/lib/libvips-cpp.so.42.11.0

to:
lambdaLayers/SharpLayer/lib/libvips.so.42.12.1
lambdaLayers/SharpLayer/lib/libvips-cpp.so.42.12.1

?

@bs-thomas
Copy link
Contributor Author

@Mosnar Sorry for spamming... but it seems to me that even if the folder "lambdaLayers/SharpLayer/lib/" is missing, it still works. Is that an outdated useless folder?

@Mosnar
Copy link
Collaborator

Mosnar commented May 4, 2020

@bs-thomas Yeah, that's what I'm looking into now. I think I may have been a little overzealous with updating without reading the full changelog. To be honest, I don't have a perfect understanding of how this part of the project works.

It looks like this was a significant change that may be working in our favor: lovell/sharp#1282

@Mosnar
Copy link
Collaborator

Mosnar commented May 4, 2020

@bs-thomas Ahah! It looks like when I built the original binaries, they were symlinked - which is what caused them to be empty.

@Mosnar
Copy link
Collaborator

Mosnar commented May 4, 2020

Found another issue with the latest version of Serverless not properly excluding dev dependencies anymore. Patching that and then I'll make another release once I've done an end-to-end test.

As always, thank you again for all the help @bs-thomas !

@Mosnar Mosnar closed this as completed May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants