question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@aws-crypto/sha256-browser missing @aws-sdk/util-utf8-browser as a dependency in package.json

See original GitHub issue

Describe the bug

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

The package “@aws-crypto/sha256-browser” depends on “@aws-sdk/util-utf8-browser” as a dependency, but did not list any dependency version info in its package manifest. Without this information, the CDN is unable to properly resolve this import.

How to fix: Let the “@aws-crypto/sha256-browser” package author know that “@aws-sdk/util-utf8-browser” needs to be included in their package.json manifest

Your environment

SDK version number

@aws-sdk/client-kms@v3.33.0

Is the issue in the browser/Node.js/ReactNative?

Deno (via skypack.dev)

Details of the browser/Node.js/ReactNative version

deno v1.14.0

Steps to reproduce

Please share code or minimal repo, and steps to reproduce the behavior.

import { KMSClient, GetPublicKeyCommand, SignCommand } from "https://cdn.skypack.dev/@aws-sdk/client-kms?dts";

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:16

github_iconTop GitHub Comments

1reaction
hausdorffcommented, Oct 26, 2021

Also worth noting that various other AWS SDKs are broken generally on (e.g.) Skypack until this change flows back to them. I tested a somewhat random sampling of @aws-sdk/client-ec2, @aws-sdk/client-ecs, @aws-sdk/client-cloudwatch-logs, and all were broken as of just now.

As before, always happy to help, just let me know what I can do. Among other things I’d be happy to help work on tests to make sure this doesn’t happen again.

1reaction
sjmuellercommented, Oct 27, 2021

Thanks @josecorella, I will only be able to verify this works when @aws-sdk/client-kms upgrades its crypto dependencies to 2.0.0 – unfortunately aws-sdk-js-v3 on main branch hasn’t updated yet: https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-kms/package.json#L22-L23

and therefore we are still seeing problems with both skypack:

error: Uncaught Error: [Package Error] “@aws-sdk/util-utf8-browser” no dependency version info found. (Imported by “@aws-crypto/sha256-browser”). throw new Error(“[Package Error] "@aws-sdk/util-utf8-browser" no dependency version info found. (Imported by "@aws-crypto/sha256-browser").”); ^ at https://cdn.skypack.dev/error/unknown:@aws-sdk/util-utf8-browser?from=@aws-crypto/sha256-browser:13:7

and esm.sh:

Uncaught SyntaxError: The requested module ‘/v54/@aws-crypto/sha256-browser@1.2.2/deno/sha256-browser.js’ does not provide an export named ‘Sha256’

Obviously aws-sdk-js-crypto-helpers@2.0.0 was released just a few hours ago, but do you know how long it will take to incorporate these latest dependencies here into v3?

EDIT

I was able to test the 2.0.0 dependencies with esm.sh through the specify external dependencies feature:

"@aws-sdk/client-kms": "https://esm.sh/@aws-sdk/client-kms?deps=@aws-crypto/sha256-browser@2.0.0,@aws-crypto/sha256-js@2.0.0"

however, the same error occurred:

The requested module ‘/v54/@aws-crypto/sha256-browser@2.0.0/deno/sha256-browser.js’ does not provide an export named ‘Sha256’

Read more comments on GitHub >

github_iconTop Results From Across the Web

Integrations AWS S3 API Starter - error with @aws-sdk/client ...
The AWS S3 starter template is throwing this error: AWS = Error: [Package Error] “@aws-sdk/util-utf8-browser” no dependency version info found.
Read more >
A module may be missing from 'dependencies' in package.json
I removed the engines part in package.json and now it works. I am assuming its an issue with node versions.
Read more >
package.json - npm Docs
The optional files field is an array of file patterns that describes the entries to be included when your package is installed as...
Read more >
Manage npm packages - Visual Studio (Windows)
js). npm packages are shown in Solution Explorer. The entries under the npm node mimic the dependencies in the package.json file. Screenshot of ......
Read more >
What Is package.json? | heynode.com
In this tutorial, learn how to manage metadata in an initial package.json file such as name, version, description, and keywords, as well as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found