3 Answers
- Newest
- Most votes
- Most comments
1
You can check resolution mentioned in similar post.
https://repost.aws/knowledge-center/lambda-import-module-error-nodejs
answered 10 months ago
0
Does your Lambda code contains a node_modules with the library installed?
yes the node_modules is in the imported including the nanoid
Did it get solved? I see a another similar question.
not yet unfortunately
0
It looks like you are referencing a module 'nanoid' that is not available by default and that you have not included in your Lambda zip file. This should help you install module and include it in the zip file. https://stackoverflow.com/questions/34437900/how-to-load-npm-modules-in-aws-lambda
I have double checked my file directory and nanoid is imported
Relevant content
- asked 2 years ago
- asked 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
So in this case, do I include the nanoid in the node_modules then deploy the zipped file ?