V8::ArrayBuffer'中的GetContents' [英] 'GetContents' in 'v8::ArrayBuffer'

查看:9
本文介绍了V8::ArrayBuffer'中的GetContents'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Mac M1,刚刚升级到节点14.17.6LTS。

我尝试使用电子生成器(22.11.7)重建Better_SQlite3(7.4.3),但收到以下错误:

‘v8::ArrayBuffer’中没有名为‘GetContents’的成员

有什么办法解决这个问题吗?提前感谢!

gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:2884:
../../nan/nan_typedarray_contents.h:34:43: error: no member named 'GetContents' in 'v8::ArrayBuffer'
      data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;

推荐答案

我使用的是Mac M1,刚刚升级到节点14.17.6LTS。

考虑到Node 16正式引入了M1支持,这是一个有趣的选择。

‘v8::ArrayBuffer’中没有名为‘GetContents’的成员

参见this doc。简而言之,GetContents在2019年末被GetBackingStore取代。作为兼容层,NaNadapted to this于2020年初推出。

因此,您可能必须确保所有相关包的版本(Node、NaN、Electronics等)相互匹配(在几乎同一时间被释放并相互瞄准的意义上)。

这篇关于V8::ArrayBuffer&#39;中的GetContents&#39;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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