参考错误:未定义 WebAssembly [英] ReferenceError: WebAssembly is not defined

查看:511
本文介绍了参考错误:未定义 WebAssembly的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在应用程序中使用了 ttest nodejs 模块.由于对它的更新,我尝试使用更新版本 ttest@2.0.0.当模块开始计算数据时出现错误:

I'm using ttest nodejs module in application. Due to updates to it I tried to use updated version ttest@2.0.0. When module start compute data the error appears:

ReferenceError:WebAssembly 未定义

NodeJS 版本 - 6.9.1.

The NodeJS version - 6.9.1.

错误出现在下一个位置:

Error appears in next place:

class CephesWrapper {
  constructor(sync) {
    // Initialize the runtime's memory
    this._wasmMemory = new WebAssembly.Memory({
      'initial': TOTAL_MEMORY / WASM_PAGE_SIZE,
      'maximum': TOTAL_MEMORY / WASM_PAGE_SIZE
    });
.....
  }
}

对于解决这个问题有什么建议吗?是否可以定义 WebAssembly?

Is there any advices about solving this issue? Is it possible to define WebAssembly?

推荐答案

NodeJs 8.0.0 中添加了 WebAssembly 支持.更新您的 NodeJS 以使其正常工作.

The WebAssembly support is added in NodeJs 8.0.0. Update your NodeJS to make it work.

这篇关于参考错误:未定义 WebAssembly的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆