Templates: Integrations AWS S3 API Starter - error with @aws-sdk/client-s3 import

The AWS S3 starter template is throwing this error:

AWS = Error: [Package Error] “@aws-sdk/util-utf8-browser” no dependency version info found. (Imported by “@aws-crypto/sha256-browser”).

Have you added your ID and Access keys?

yes. that code block should really run regardless though because it is just an import.

The missing dependency was added just a few hours ago to sha256-browser (Add missing util-utf8-browser dependency by danthegoodman · Pull Request #245 · aws/aws-sdk-js-crypto-helpers · GitHub) and a new npm release has been published (https://cdn.jsdelivr.net/npm/@aws-crypto/sha256-browser/package.json).

However I’m not sure if there needs to be a new npm release for @aws-sdk/client-s3, or if there’s some other way to invalidate skypack’s cache.

1 Like

Thanks @mootari for finding all that, and thanks @aaronkyle for helping Sara Quigley with this last week. I’m sorry I’ve been delinquent in following up on this! Thanks to the efforts of others it seems like it’s getting close to fixed.

I’ve written up my current understanding in the notebook below. The package.json of @aws-sdk/client-s3@3.38.0 (the latest) requires @aws-crypto/sha256-browser": "^1.0.0". That won’t match yesterday’s v2.0.0 fix, which is what we need. So it seems like this isn’t just a caching issue and we need to wait for a new version of client-s3 to be published. If it’s not done soon I’ll open a PR to just bump these two lines. (There are a ton of other packages in the SDK with the same issue, so I’m not sure whether to just find-and-replace all of them or what.)

2 Likes

The required change was committed a few hours ago. So far no new release has been published.

This seems to have been finally resolved by v3.39.0 of the AWS SDK, though the conversation continues in this issue.

It is a little troubling that it broke previously despite having being pinned to a working version. Hoping v3 of the SDK settles down toward something more stable.

There’s a lot I could’ve tried sooner/faster here (instead of freeriding on that issue), but my most acute personal regret is that I should’ve put a prominent notice at the top of the broken templates as soon as this became an issue. I’m not sure why I didn’t. My bad.

3 Likes