我在应用程序中使用 ttest nodejs 模块。由于更新,我尝试使用更新版本 ttest@2.0.0。当模块开始计算数据时出现错误:
ReferenceError: WebAssembly 未定义
NodeJS 版本 - 6.9.1。
错误出现在下一个地方:
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?
最佳答案
在 NodeJs 8.0.0 中添加了 WebAssembly 支持。更新您的 NodeJS 以使其正常工作。
关于node.js - 引用错误 : WebAssembly is not defined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53871470/