无法解决@wasmer/wasi/lib/bindings/browser'来自&#x27 ;/ index.js'

发布于 2025-02-11 08:26:38 字数 827 浏览 0 评论 0原文

我正在尝试在JavaScript中的Windows上的Wasmer上运行Hello-World程序(Wasmer是在服务器上执行WebAssembly的开源运行时)。但是我遇到以下错误。您可以查看代码: hello-world

Server running at http://localhost:1234
× Build failed.

@parcel/core: Failed to resolve '@wasmer/wasi/lib/bindings/browser' from './index.js'

  C:\Users\msi\docs.wasmer.io\integrations\js\wasi\browser\examples\hello-world\index.js:2:29
    1 | import { WASI } from '@wasmer/wasi/lib'
  > 2 | import browserBindings from '@wasmer/wasi/lib/bindings/browser'
  >   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    3 | import { WasmFs } from '@wasmer/wasmfs'
    4 |

I am trying to run the hello-world program in Wasmer on windows which is in Javascript (Wasmer is an open-source runtime for executing WebAssembly on the Server). But I am getting the below error. You can have a look at the code: Hello-World

Server running at http://localhost:1234
× Build failed.

@parcel/core: Failed to resolve '@wasmer/wasi/lib/bindings/browser' from './index.js'

  C:\Users\msi\docs.wasmer.io\integrations\js\wasi\browser\examples\hello-world\index.js:2:29
    1 | import { WASI } from '@wasmer/wasi/lib'
  > 2 | import browserBindings from '@wasmer/wasi/lib/bindings/browser'
  >   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    3 | import { WasmFs } from '@wasmer/wasmfs'
    4 |

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱人如己 2025-02-18 08:26:38

链接的Hello World示例是使用 @Wasmer/wasi/wasi

您需要降级版本或跟随最新文档

That linked hello world example is using an old version of @wasmer/wasi.

You need to either downgrade your version, or follow the up-to-date docs

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文