-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
typescript - api-cors-lambda-crud-dynamodb -missing uuid in package.json #276
Comments
Hi @nazreen , thanks for creating the issue. I was able to reproduce it. Will update once I finish testing your PR. |
hi @hossain-rayhan , I realised my PR was wrong. I am going to update it now. |
@hossain-rayhan I have updated the issue description with more detail on the error and the solution. I will submit a PR with the fix now. |
ok so the fix to this issue is in #278 |
Hey @nazreen, I apologize for the delay in response! It appears that the issue is not the Thank you for working on this! 😷 |
@NGL321 , ok, so I tried updating the line to: correct me if I'm wrong, but |
@nazreen After verification, you are correct. Actually, in hindsight, I am surprised this worked to begin with 🤷. The proper solution to this would be to utilize a Lambda Layer, however the solution proposed here of zipping the whole lambda with dependencies as a single deployment package is also valid. There are really two options for this. Either pre-package and update the example with that package, or add instructions on building out that package. Cheers |
@NGL321 thanks for the quick response! Going to write this now before I go to bed (will continue tomorrow). I'd like to see this through, don't worry! Okay, so the deployment package approach, is the approach in this PR. AFAIK, cdk's However, I think there's a complication that you might be able to shed light on. The build fails. The error message is I think this is because for every |
@NGL321 bump :) just checking if you're aware of this |
Anyway we could get a fix for this? Would be good with an example showing how to do external dependencies with ts cdk |
Any fix available for this yet? |
I think using the experimental @aws-cdk/aws-lambda-nodejs is the way to go, works for me: https://github.com/chrischenyc/url-shortener-cdk-typescript |
|
🐛 Bug Report
What is the problem?
Error message
Error: Cannot find module 'uuid/v4
when testingcreate
function.Reproduction Steps
createItem
function with the following test event:"Error: Cannot find module 'uuid/v4
Environment
Other information
The solution requires the uuid package being present inside a
node_modules
of thesrc
folder. Currently there is no package.json inside the src folder.The text was updated successfully, but these errors were encountered: