aws-samples / aws-serverless-workshop-innovator-island

Welcome to the Innovator Island serverless workshop! This repo contains all the instructions and code you need to complete the workshop.
MIT No Attribution
564 stars 228 forks source link

Deprecated uuid sintax in theme-park-backend-S3UploaderFunction #18

Closed Montbra closed 4 years ago

Montbra commented 4 years ago

Running in module errors in this function. Per npm docs:

Deep Requires No Longer Supported Deep requires like require('uuid/v4') which have been deprecated in uuid@7 is no longer supported.

Changes made in code: //const uuidv4 = require('uuid/v4') const { v4: uuidv4 } = require('uuid')

Redeploy and now works like a charm.

jbesw commented 4 years ago

Hi! This was a breaking change in UUID - we fixed the https://github.com/aws-samples/aws-serverless-workshop-innovator-island/blob/master/1-app-deploy/sam-app/getUploadURL/app.js code on Monday night, but many workshop attendees had already deployed the code. It's really unfortunate timing! Thanks for the comment.