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

Missing module Sharp? #14

Closed
fearghalmurphy opened this issue Mar 31, 2020 · 2 comments
Closed

Missing module Sharp? #14

fearghalmurphy opened this issue Mar 31, 2020 · 2 comments
Labels

Comments

@fearghalmurphy
Copy link

Forgive my lack of knowledge on AWS - i'm kind of a newbie but when i try to test the lambda the following gets returned - is there a missing module or do i need to do anything additional to your tutorial? Thank you! Any help is appreciated.

Response:
{
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module 'sharp'",
"trace": [
"Runtime.ImportModuleError: Error: Cannot find module 'sharp'",
" at _loadUserApp (/var/runtime/UserFunction.js:100:13)",
" at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)",
" at Object. (/var/runtime/index.js:45:30)",
" at Module._compile (internal/modules/cjs/loader.js:778:30)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)",
" at Module.load (internal/modules/cjs/loader.js:653:32)",
" at tryModuleLoad (internal/modules/cjs/loader.js:593:12)",
" at Function.Module._load (internal/modules/cjs/loader.js:585:3)",
" at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)",
" at startup (internal/bootstrap/node.js:283:19)"
]
}

Request ID:
"a9d515ef-c4a3-4b8b-ba30-f8d2c643bc0b"

Function Logs:
START RequestId: a9d515ef-c4a3-4b8b-ba30-f8d2c643bc0b Version: $LATEST
2020-03-31T13:40:02.304Z undefined ERROR Uncaught Exception {"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module 'sharp'","stack":["Runtime.ImportModuleError: Error: Cannot find module 'sharp'"," at _loadUserApp (/var/runtime/UserFunction.js:100:13)"," at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)"," at Object. (/var/runtime/index.js:45:30)"," at Module._compile (internal/modules/cjs/loader.js:778:30)"," at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)"," at Module.load (internal/modules/cjs/loader.js:653:32)"," at tryModuleLoad (internal/modules/cjs/loader.js:593:12)"," at Function.Module._load (internal/modules/cjs/loader.js:585:3)"," at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)"," at startup (internal/bootstrap/node.js:283:19)"]}
END RequestId: a9d515ef-c4a3-4b8b-ba30-f8d2c643bc0b
REPORT RequestId: a9d515ef-c4a3-4b8b-ba30-f8d2c643bc0b Duration: 763.36 ms Billed Duration: 800 ms Memory Size: 768 MB Max Memory Used: 30 MB
Unknown application error occurred
Runtime.ImportModuleError

@sagidM
Copy link
Owner

sagidM commented Apr 4, 2020

@fearghalmurphy thank you for the issue.
How exactly have you set up the lambda?
Notice that you should upload a zip file from https://github.com/sagidM/s3-resizer/releases, not just index.js

@sagidM
Copy link
Owner

sagidM commented Jun 28, 2020

Closing this issue. You've probably uploaded a single index.js whereas should have a zip file from the releases.

@sagidM sagidM closed this as completed Jun 28, 2020
@sagidM sagidM added the invalid label Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants