gpt4 book ai didi

javascript - pty.js 安装错误?

转载 作者:行者123 更新时间:2023-11-30 20:19:20 26 4
gpt4 key购买 nike

我在尝试使用 Node 安装 pty.js 时遇到了一个不寻常的问题:

如果我运行 npm install pty.js 我收到这个错误:

   > pty.js@0.3.1 install 
/Users/username/WebstormProjects/example/node_modules/pty.js
> node-gyp rebuild

CXX(target) Release/obj.target/pty/src/unix/pty.o
In file included from ../src/unix/pty.cc:20:
In file included from ../node_modules/nan/nan.h:190:
../node_modules/nan/nan_maybe_43_inl.h:88:15: error: no member named 'ForceSet' in 'v8::Object'
return obj->ForceSet(GetCurrentContext(), key, value, attribs);
~~~ ^
In file included from ../src/unix/pty.cc:20:
../node_modules/nan/nan.h:816:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback()
^

我阅读了“在 OS X 上安装 pty.js( Node )时出错”一文,但他没有帮助我解决问题。

最佳答案

您需要删除 package.json 中的符号 ^

 "ajv": "6.0.0",
"ajv-keywords": "3.2.0"

nodejs 中的这个错误 ^10(nuxt.js 项目)

关于javascript - pty.js 安装错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51623198/

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