无法解决@wasmer/wasi/lib/bindings/browser'来自&#x27 ;/ index.js'
我正在尝试在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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
链接的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