Skip to content

Fix module import problem with js-sha256 #675

@TrentBrown

Description

@TrentBrown

Describe the bug

When serving a web app with web-dev-server, attempting to import a backend description file results in a runtime syntax error at the point where the @dfinity/agent tries to load the js-sha256 code.

To Reproduce

I created the most minimal example of what I'm seeing and pushed the project up to my GitHub account here. The ReadMe there has the steps to reproduce:

CleanShot_2023-01-04_at_15 48 39

For reference, this is the Discord conversation I had with Kyle in the #ask-questions Discord channel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions