当试图使用节点安装pty.js时,我遇到了一个无法理解的问题:
如果运行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上安装pty.js (节点)时出错”,但他没有帮助我解决这个问题。
发布于 2018-08-01 00:40:00
您需要删除package.json中的求和^
"ajv": "6.0.0",
"ajv-keywords": "3.2.0"nodejs ^10 (nuxt.js项目)中的此错误
发布于 2019-08-27 13:51:06
包不再被维护,所以它不支持最后一个节点(更多信息)。
使用node@8或迁移到node-pty (在编写本报告时,node@12只受node-pty@beta支持)
https://stackoverflow.com/questions/51623198
复制相似问题