Unable to import module 'aws/index'
GabrielStetco opened this issue · 2 comments
Hi Barrett,
I get this error after uploading the test video (good.mp4), after the setup procedure completed correctly.
Unable to import module 'aws/index': Error at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/var/task/common.js:18:12) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17)
For this error, I found that in some cases the zip structure is not correct, but all looks good. This is the structure:
aws - dir
- index.js - 956
- lib.js - 2,231
common.js - 7,986
config.json - 394
ffmpeg - 45,431,664
ffprobe - 45,345,328
node_modules - dir (empty)
This is the link to the package: https://s3.eu-central-1.amazonaws.com/amc-functions/aws-lambda-ffmpeg.zip
I appreciate your work
Gabriel
The issue was a devDependency upgrade for gulp-chmod, which made the files unreadable. I just tested by creating a new stack from scratch and that appears to have been the issue. Sorry for this oversight. Please pull the latest master or checkout tag v2.2.0 and run gulp aws:default
again.
Thank you.
Now it works well.