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

"errorMessage": "Error: Cannot find module 'sharp'\nRequire stack:\n- /var/task/index.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js", #20

Closed
8secz-johndpope opened this issue Jan 11, 2021 · 2 comments

Comments

@8secz-johndpope
Copy link

{
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module 'sharp'\nRequire stack:\n- /var/task/index.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js",
"trace": [
"Runtime.ImportModuleError: Error: Cannot find module 'sharp'",
"Require stack:",
"- /var/task/index.js",
"- /var/runtime/UserFunction.js",
"- /var/runtime/index.js",
" 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:43:30)",
" at Module._compile (internal/modules/cjs/loader.js:1015:30)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)",
" at Module.load (internal/modules/cjs/loader.js:879:32)",
" at Function.Module._load (internal/modules/cjs/loader.js:724:14)",
" at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)",
" at internal/main/run_main_module.js:17:47"
]
}

@8secz-johndpope
Copy link
Author

8secz-johndpope commented Jan 11, 2021

for clarity - is the s3 function supposed to look like this?
or like the index.js in the layer?

Screen Shot 2021-01-11 at 4 22 33 pm

Screen Shot 2021-01-11 at 4 23 19 pm

@sagidM
Copy link
Owner

sagidM commented Jan 30, 2021

@8secz-johndpope no, absolutely not. Please take a look on the Releases page https://github.com/sagidM/s3-resizer/releases . You should attach the zip archive rather than editing index.js
The section Add s3-resizer.zip and make lambda work in the readme.
I am closing this issue. If I did not get you right, don't hesitate to reopen it

@sagidM sagidM closed this as completed Jan 30, 2021
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