1

I have run into an unusal problem when trying to install pty.js using node:

If I run npm install pty.js I receive this error:

   > 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()
^

I read post "Errors installing pty.js (node) on OS X" but he did not help me to solve the problem.

2 Answers2

1

you need remove sumbol ^ in you package.json

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

this error in nodejs ^10 (nuxt.js project)

b-m-9
  • 126
  • 4
0

The package is not maintained anymore, so it does not support last node (more info)

Use node@8 or migrate to node-pty (at the time of writing, node@12 is supported only by node-pty@beta)

Lin
  • 1,041
  • 10
  • 6