gpt4 book ai didi

node.js - 本Node实例使用的V8平台不支持创建Worker

转载 作者:行者123 更新时间:2023-12-05 05:00:15 59 4
gpt4 key购买 nike

在我当前的项目中,我在创建 worker 时遇到以下错误消息:

ERROR Error: The V8 platform used by this instanceof Node does not support creating Workers

我在 SO 上发现了各种评论如下的帖子:It was added in nodejs v10.5.0.

有人知道这是怎么回事吗?

$ process.versions
ares:'1.16.0'
brotli:'1.0.7'
chrome:'85.0.4183.39'
electron:'10.0.0-beta.14'
http_parser:'2.9.3'
icu:'67.1'
llhttp:'2.0.4'
modules:'82'
napi:'5'
nghttp2:'1.41.0'
node:'12.16.3'
openssl:'1.1.0'
unicode:'13.0'

ma​​in.ts

  win = new BrowserWindow({
webPreferences: {
nodeIntegrationInWorker: true,
nodeIntegration: true,
allowRunningInsecureContent: (serve) ? true : false,
},
});

最佳答案

从 main.js 启动 Workers

我让我的 Workers 从我的 renderer.js 启动,然后我注意到这里的评论 (https://www.giters.com/nrkno/sofie-atem-connection/issues/125) 提到当 Workers 在 main.js 之外启动时,有一个错误会导致此 V8 平台消息。

在我的特殊情况下,它还没有完全工作,但我没有再收到这条消息,我认为我的未决问题与此无关。

关于node.js - 本Node实例使用的V8平台不支持创建Worker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63143012/

59 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com