Theia node 12.x version error

When i run “yarn” command, error message appears like below.

make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/git_repo/theia/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:223:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.15.0-46-generic
gyp ERR! command "/home/.nvm/versions/node/v12.14.1/bin/node" "/home/git_repo/theia/node_modules/.bin/node-gyp" "rebuild" 
gyp ERR! cwd /home/git_repo/theia/node_modules/@theia/node-pty

I search about this issue, and i found https://github.com/nodejs/node-gyp/issues/1763
But, that recommendation doesn’t resolve my environment.

How can i do for it ?
Any ideas could help my issue.

gyp ERR! stack Error: `make` failed with exit code: 2

Theia depends on some Node.js native extensions (C/C++) that are built on your machine upon installation. The current output looks like make failed for some reason. Maybe more clues are lying around in the rest of the output which is not shown?

@marechal-p
Thanks for reply my issue.

More clues are below.

/home/ .cache/node-gyp/12.14.1/include/node/v8.h:2572:44: note: candidate expects 1 argument, 0 provided
In file included from /home/ .cache/node-gyp/12.14.1/include/node/v8-internal.h:14:0,
from /home/ .cache/node-gyp/12.14.1/include/node/v8.h:25,
from /home/ .cache/node-gyp/12.14.1/include/node/node.h:63,
from …/node_modules/nan/nan.h:51,
from …/src/unix/pty.cc:20:
/home/ .cache/node-gyp/12.14.1/include/node/v8.h:2588:31: note: candidate: v8::Localv8::String v8::Value::ToString(v8::Isolate*) const
Local ToString(Isolate* isolate) const);
^
/home/ .cache/node-gyp/12.14.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
/home/ .cache/node-gyp/12.14.1/include/node/v8.h:2588:31: note: candidate expects 1 argument, 0 provided
Local ToString(Isolate* isolate) const);
^
/home/ .cache/node-gyp/12.14.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
…/src/unix/pty.cc: In function ‘void pty_after_waitpid(uv_async_t*)’:
…/src/unix/pty.cc:596:69: warning: ‘v8::Localv8::Value Nan::Callback::Call(v8::Localv8::Object, int, v8::Localv8::Value*) const’ is deprecated [-Wdeprecated-declarations]
Nan::Callback(cb).Call(Nan::GetCurrentContext()->Global(), 2, argv);
^
In file included from …/src/unix/pty.cc:20:0:
…/node_modules/nan/nan.h:1596:3: note: declared here
Call(v8::Localv8::Object target
^~~~
…/src/unix/pty.cc: In function ‘void init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
…/src/unix/pty.cc:812:65: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
Nan::Newv8::FunctionTemplate(PtyFork)->GetFunction());
^
In file included from /home/ .cache/node-gyp/12.14.1/include/node/node.h:63:0,
from …/node_modules/nan/nan.h:51,
from …/src/unix/pty.cc:20:
/home/ .cache/node-gyp/12.14.1/include/node/v8.h:5995:46: note: candidate: v8::MaybeLocalv8::Function v8::FunctionTemplate::GetFunction(v8::Localv8::Context)
V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
^~~~~~~~~~~
/home/ .cache/node-gyp/12.14.1/include/node/v8.h:5995:46: note: candidate expects 1 argument, 0 provided
…/src/unix/pty.cc:815:65: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
Nan::Newv8::FunctionTemplate(PtyOpen)->GetFunction());
^
In file included from /home/ .cache/node-gyp/12.14.1/include/node/node.h:63:0,
from …/node_modules/nan/nan.h:51,
from …/src/unix/pty.cc:20:
/home/ .cache/node-gyp/12.14.1/include/node/v8.h:5995:46: note: candidate: v8::MaybeLocalv8::Function v8::FunctionTemplate::GetFunction(v8::Localv8::Context)
V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
^~~~~~~~~~~
/home/ .cache/node-gyp/12.14.1/include/node/v8.h:5995:46: note: candidate expects 1 argument, 0 provided
…/src/unix/pty.cc:818:67: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
Nan::Newv8::FunctionTemplate(PtyResize)->GetFunction());
^
In file included from /home/ .cache/node-gyp/12.14.1/include/node/node.h:63:0,
from …/node_modules/nan/nan.h:51,
from …/src/unix/pty.cc:20:
/home/ .cache/node-gyp/12.14.1/include/node/v8.h:5995:46: note: candidate: v8::MaybeLocalv8::Function v8::FunctionTemplate::GetFunction(v8::Localv8::Context)
V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
^~~~~~~~~~~
/home/ .cache/node-gyp/12.14.1/include/node/v8.h:5995:46: note: candidate expects 1 argument, 0 provided
…/src/unix/pty.cc:821:68: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
Nan::Newv8::FunctionTemplate(PtyGetProc)->GetFunction());
^
In file included from /home/ .cache/node-gyp/12.14.1/include/node/node.h:63:0,
from …/node_modules/nan/nan.h:51,
from …/src/unix/pty.cc:20:
/home/ .cache/node-gyp/12.14.1/include/node/v8.h:5995:46: note: candidate: v8::MaybeLocalv8::Function v8::FunctionTemplate::GetFunction(v8::Localv8::Context)
V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
^~~~~~~~~~~
/home/ .cache/node-gyp/12.14.1/include/node/v8.h:5995:46: note: candidate expects 1 argument, 0 provided
pty.target.mk:109: recipe for target ‘Release/obj.target/pty/src/unix/pty.o’ failed
make: 디렉터리 ‘/home/ git_rep/…/node_modules/@theia/node-pty/build’ 나감
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/ git_rep/…/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:223:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.15.0-46-generic
gyp ERR! command “/home/ .nvm/versions/node/v12.14.1/bin/node” “/home/ git_rep/…/node_modules/.bin/node-gyp” “rebuild”
gyp ERR! cwd /home/ git_rep/…/node_modules/@theia/node-pty

Error starts with below.

error /home/  git_rep/... /@theia/node-pty: Command failed.
Exit code: 1
Command: node scripts/install.js
Arguments: 
Directory: /home/  git_rep/.../node_modules/@theia/node-pty
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@6.1.0
gyp info using node@12.14.1 | linux | x64
gyp info find Python using Python version 3.6.9 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/home/  git_rep/.../node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/  git_rep/.../node_modules/@theia/node-pty/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/  git_rep/.../node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/  .cache/node-gyp/12.14.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/  .cache/node-gyp/12.14.1',
gyp info spawn args   '-Dnode_gyp_dir=/home/  git_rep/.../node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/  .cache/node-gyp/12.14.1/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/  git_rep/.../node_modules/@theia/node-pty',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: 디렉터리 '/home/  git_rep/.../node_modules/@theia/node-pty/build' 들어감
  CXX(target) Release/obj.target/pty/src/unix/pty.o
In file included from ../node_modules/nan/nan_converters.h:67:0,
                 from ../node_modules/nan/nan.h:202,
                 from ../src/unix/pty.cc:20:
../node_modules/nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ToFactoryBase<v8::Boolean>::return_t Nan::imp::ToFactory<v8::Boolean>::convert(v8::Local<v8::Value>)’:
../node_modules/nan/nan_converters_43_inl.h:18:51: warning: ‘v8::MaybeLocal<v8::Boolean> v8::Value::ToBoolean(v8::Local<v8::Context>) const’ is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]
       val->To ## TYPE(isolate->GetCurrentContext())                            \
                                                   ^
../node_modules/nan/nan_converters_43_inl.h:22:1: note: in expansion of macro ‘X’
 X(Boolean)
 ^
In file included from /home/  .cache/node-gyp/12.14.1/include/node/v8-internal.h:14:0,
                 from /home/  .cache/node-gyp/12.14.1/include/node/v8.h:25,
                 from /home/  .cache/node-gyp/12.14.1/include/node/node.h:63,
                 from ../node_modules/nan/nan.h:51,
                 from ../src/unix/pty.cc:20:
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:2568:59: note: declared here
                 V8_WARN_UNUSED_RESULT MaybeLocal<Boolean> ToBoolean(
                                                           ^
/home/  .cache/node-gyp/12.14.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../node_modules/nan/nan_converters.h:67:0,
                 from ../node_modules/nan/nan.h:202,
                 from ../src/unix/pty.cc:20:
../node_modules/nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ValueFactoryBase<bool>::return_t Nan::imp::ToFactory<bool>::convert(v8::Local<v8::Value>)’:
../node_modules/nan/nan_converters_43_inl.h:37:57: warning: ‘v8::Maybe<bool> v8::Value::BooleanValue(v8::Local<v8::Context>) const’ is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
   return val->NAME ## Value(isolate->GetCurrentContext());                     \
                                                         ^
../node_modules/nan/nan_converters_43_inl.h:40:1: note: in expansion of macro ‘X’
 X(bool, Boolean)
 ^
In file included from /home/  .cache/node-gyp/12.14.1/include/node/v8-internal.h:14:0,
                 from /home/  .cache/node-gyp/12.14.1/include/node/v8.h:25,
                 from /home/  .cache/node-gyp/12.14.1/include/node/node.h:63,
                 from ../node_modules/nan/nan.h:51,
                 from ../src/unix/pty.cc:20:
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:2606:51: note: declared here
                 V8_WARN_UNUSED_RESULT Maybe<bool> BooleanValue(
                                                   ^
/home/  .cache/node-gyp/12.14.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../node_modules/nan/nan_new.h:189:0,
                 from ../node_modules/nan/nan.h:203,
                 from ../src/unix/pty.cc:20:
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::Function>::return_t Nan::imp::Factory<v8::Function>::New(Nan::FunctionCallback, v8::Local<v8::Value>)’:
../node_modules/nan/nan_implementation_12_inl.h:105:32: error: no matching function for call to ‘v8::Function::New(v8::Isolate*&, void (&)(const v8::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Object>&)’
                           , obj));
                                ^
In file included from /home/  .cache/node-gyp/12.14.1/include/node/node.h:63:0,
                 from ../node_modules/nan/nan.h:51,
                 from ../src/unix/pty.cc:20:
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:4170:31: note: candidate: static v8::MaybeLocal<v8::Function> v8::Function::New(v8::Local<v8::Context>, v8::FunctionCallback, v8::Local<v8::Value>, int, v8::ConstructorBehavior, v8::SideEffectType)
   static MaybeLocal<Function> New(
                               ^~~
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:4170:31: note:   no known conversion for argument 1 from ‘v8::Isolate*’ to ‘v8::Local<v8::Context>’
In file included from ../node_modules/nan/nan_new.h:189:0,
                 from ../node_modules/nan/nan.h:203,
                 from ../src/unix/pty.cc:20:
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::StringObject>::return_t Nan::imp::Factory<v8::StringObject>::New(v8::Local<v8::String>)’:
../node_modules/nan/nan_implementation_12_inl.h:337:37: error: no matching function for call to ‘v8::StringObject::New(v8::Local<v8::String>&)’
   return v8::StringObject::New(value).As<v8::StringObject>();
                                     ^
In file included from /home/  .cache/node-gyp/12.14.1/include/node/node.h:63:0,
                 from ../node_modules/nan/nan.h:51,
                 from ../src/unix/pty.cc:20:
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:5426:23: note: candidate: static v8::Local<v8::Value> v8::StringObject::New(v8::Isolate*, v8::Local<v8::String>)
   static Local<Value> New(Isolate* isolate, Local<String> value);
                       ^~~
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:5426:23: note:   candidate expects 2 arguments, 1 provided
In file included from ../node_modules/nan/nan_new.h:189:0,
                 from ../node_modules/nan/nan.h:203,
                 from ../src/unix/pty.cc:20:
../node_modules/nan/nan_implementation_12_inl.h:337:58: error: expected primary-expression before ‘>’ token
   return v8::StringObject::New(value).As<v8::StringObject>();
                                                          ^
../node_modules/nan/nan_implementation_12_inl.h:337:60: error: expected primary-expression before ‘)’ token
   return v8::StringObject::New(value).As<v8::StringObject>();
                                                            ^
In file included from ../src/unix/pty.cc:20:0:
../node_modules/nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:1034:53: error: no matching function for call to ‘v8::Value::ToString()’
       v8::Local<v8::String> string = from->ToString();
                                                     ^
In file included from /home/  .cache/node-gyp/12.14.1/include/node/node.h:63:0,
                 from ../node_modules/nan/nan.h:51,
                 from ../src/unix/pty.cc:20:
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:2572:44: note: candidate: v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                            ^~~~~~~~
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:2572:44: note:   candidate expects 1 argument, 0 provided
In file included from /home/  .cache/node-gyp/12.14.1/include/node/v8-internal.h:14:0,
                 from /home/  .cache/node-gyp/12.14.1/include/node/v8.h:25,
                 from /home/  .cache/node-gyp/12.14.1/include/node/node.h:63,
                 from ../node_modules/nan/nan.h:51,
                 from ../src/unix/pty.cc:20:
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:2588:31: note: candidate: v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const
                 Local<String> ToString(Isolate* isolate) const);
                               ^
/home/  .cache/node-gyp/12.14.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:2588:31: note:   candidate expects 1 argument, 0 provided
                 Local<String> ToString(Isolate* isolate) const);
                               ^
/home/  .cache/node-gyp/12.14.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/unix/pty.cc:20:0:
../node_modules/nan/nan.h:1044:74: error: no matching function for call to ‘v8::String::WriteUtf8(char*&, int, int, const int&)’
         length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
                                                                          ^
In file included from /home/  .cache/node-gyp/12.14.1/include/node/node.h:63:0,
                 from ../node_modules/nan/nan.h:51,
                 from ../src/unix/pty.cc:20:
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:2782:7: note: candidate: int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const
   int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
       ^~~~~~~~~
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:2782:7: note:   no known conversion for argument 1 from ‘char*’ to ‘v8::Isolate*’
In file included from ../src/unix/pty.cc:20:0:
../node_modules/nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const char*, const v8::Local<v8::Value>&)’:
../node_modules/nan/nan.h:1818:64: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
                                                                ^
In file included from /home/  .cache/node-gyp/12.14.1/include/node/v8-internal.h:14:0,
                 from /home/  .cache/node-gyp/12.14.1/include/node/v8.h:25,
                 from /home/  .cache/node-gyp/12.14.1/include/node/node.h:63,
                 from ../node_modules/nan/nan.h:51,
                 from ../src/unix/pty.cc:20:
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:3403:22: note: declared here
                 bool Set(Local<Value> key, Local<Value> value));
                      ^
/home/  .cache/node-gyp/12.14.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/unix/pty.cc:20:0:
../node_modules/nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const v8::Local<v8::String>&, const v8::Local<v8::Value>&)’:
../node_modules/nan/nan.h:1824:42: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     New(persistentHandle)->Set(key, value);
                                          ^
In file included from /home/  .cache/node-gyp/12.14.1/include/node/v8-internal.h:14:0,
                 from /home/  .cache/node-gyp/12.14.1/include/node/v8.h:25,
                 from /home/  .cache/node-gyp/12.14.1/include/node/node.h:63,
                 from ../node_modules/nan/nan.h:51,
                 from ../src/unix/pty.cc:20:
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:3403:22: note: declared here
                 bool Set(Local<Value> key, Local<Value> value));
                      ^
/home/  .cache/node-gyp/12.14.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/unix/pty.cc:20:0:
../node_modules/nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(uint32_t, const v8::Local<v8::Value>&)’:
../node_modules/nan/nan.h:1830:44: warning: ‘bool v8::Object::Set(uint32_t, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     New(persistentHandle)->Set(index, value);
                                            ^
In file included from /home/  .cache/node-gyp/12.14.1/include/node/v8-internal.h:14:0,
                 from /home/  .cache/node-gyp/12.14.1/include/node/v8.h:25,
                 from /home/  .cache/node-gyp/12.14.1/include/node/node.h:63,
                 from ../node_modules/nan/nan.h:51,
                 from ../src/unix/pty.cc:20:
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:3412:22: note: declared here
                 bool Set(uint32_t index, Local<Value> value));
                      ^
/home/  .cache/node-gyp/12.14.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/unix/pty.cc:20:0:
../node_modules/nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const char*) const’:
../node_modules/nan/nan.h:1836:61: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
         New(persistentHandle)->Get(New(key).ToLocalChecked()));
                                                             ^
In file included from /home/  .cache/node-gyp/12.14.1/include/node/v8-internal.h:14:0,
                 from /home/  .cache/node-gyp/12.14.1/include/node/v8.h:25,
                 from /home/  .cache/node-gyp/12.14.1/include/node/node.h:63,
                 from ../node_modules/nan/nan.h:51,
                 from ../src/unix/pty.cc:20:
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:3457:51: note: declared here
   V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
                                                   ^
/home/  .cache/node-gyp/12.14.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/unix/pty.cc:20:0:
../node_modules/nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const v8::Local<v8::String>&) const’:
../node_modules/nan/nan.h:1842:55: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     return scope.Escape(New(persistentHandle)->Get(key));
                                                       ^
In file included from /home/  .cache/node-gyp/12.14.1/include/node/v8-internal.h:14:0,
                 from /home/  .cache/node-gyp/12.14.1/include/node/v8.h:25,
                 from /home/  .cache/node-gyp/12.14.1/include/node/node.h:63,
                 from ../node_modules/nan/nan.h:51,
                 from ../src/unix/pty.cc:20:
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:3457:51: note: declared here
   V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
                                                   ^
/home/  .cache/node-gyp/12.14.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/unix/pty.cc:20:0:
../node_modules/nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(uint32_t) const’:
../node_modules/nan/nan.h:1847:57: warning: ‘v8::Local<v8::Value> v8::Object::Get(uint32_t)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     return scope.Escape(New(persistentHandle)->Get(index));
                                                         ^
In file included from /home/  .cache/node-gyp/12.14.1/include/node/v8-internal.h:14:0,
                 from /home/  .cache/node-gyp/12.14.1/include/node/v8.h:25,
                 from /home/  .cache/node-gyp/12.14.1/include/node/node.h:63,
                 from ../node_modules/nan/nan.h:51,
                 from ../src/unix/pty.cc:20:
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:3461:51: note: declared here
   V8_DEPRECATED("Use maybe version", Local<Value> Get(uint32_t index));
                                                   ^
/home/  .cache/node-gyp/12.14.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from /usr/include/c++/7/cassert:44:0,
                 from /home/  .cache/node-gyp/12.14.1/include/node/node_object_wrap.h:26,
                 from ../node_modules/nan/nan.h:53,
                 from ../src/unix/pty.cc:20:
../node_modules/nan/nan_object_wrap.h: In destructor ‘virtual Nan::ObjectWrap::~ObjectWrap()’:
../node_modules/nan/nan_object_wrap.h:24:25: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
     assert(persistent().IsNearDeath());
                         ^
In file included from ../node_modules/nan/nan.h:2657:0,
                 from ../src/unix/pty.cc:20:
../node_modules/nan/nan_object_wrap.h: In member function ‘void Nan::ObjectWrap::MakeWeak()’:
../node_modules/nan/nan_object_wrap.h:67:34: warning: ‘void v8::PersistentBase<T>::MarkIndependent() [with T = v8::Object]’ is deprecated: Weak objects are always considered independent. Use TracedGlobal when trying to use EmbedderHeapTracer. Use a strong handle when trying to keep an object alive. [-Wdeprecated-declarations]
     persistent().MarkIndependent();
                                  ^
In file included from /home/  .cache/node-gyp/12.14.1/include/node/v8-internal.h:14:0,
                 from /home/  .cache/node-gyp/12.14.1/include/node/v8.h:25,
                 from /home/  .cache/node-gyp/12.14.1/include/node/node.h:63,
                 from ../node_modules/nan/nan.h:51,
                 from ../src/unix/pty.cc:20:
/home/  .cache/node-gyp/12.14.1/include/node/v8.h:567:22: note: declared here
       V8_INLINE void MarkIndependent());
                      ^
/home/  .cache/node-gyp/12.14.1/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from /usr/include/c++/7/cassert:44:0,
                 from /home/  .cache/node-gyp/12.14.1/include/node/node_object_wrap.h:26,
                 from ../node_modules/nan/nan.h:53,
                 from ../src/unix/pty.cc:20:
../node_modules/nan/nan_object_wrap.h: In static member function ‘static void Nan::ObjectWrap::WeakCallback(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’:
../node_modules/nan/nan_object_wrap.h:124:26: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
     assert(wrap->handle_.IsNearDeath());
                          ^
../src/unix/pty.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE PtyFork(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/unix/pty.cc:185:48: error: no matching function for call to ‘v8::Value::ToString()’

Not really sure what went wrong. From the first error I see:

In file included from ../node_modules/nan/nan_new.h:189:0,
                 from ../node_modules/nan/nan.h:203,
                 from ../src/unix/pty.cc:20:
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::Function>::return_t Nan::imp::Factory<v8::Function>::New(Nan::FunctionCallback, v8::Local<v8::Value>)’:
../node_modules/nan/nan_implementation_12_inl.h:105:32: error: no matching function for call to ‘v8::Function::New(v8::Isolate*&, void (&)(const v8::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Object>&)’
                           , obj));
                                ^

It looks like it fails on the #include <nan> from pty.cc directly. Meaning your compiler trips over the nan headers before even failing on the extension’s code…

As I said, I don’t know what’s causing this. But maybe something’s wrong with your build toolchain?

Hi,

I am gettting a similar error when trying to build theia with the latest tags. The package.json is according to the guidelines mentioned in the Theia apps - theia electron.

Versions:

node -v
v12.14.1
yarn -v
1.22.5

Error log:

error /Users/user1/GitHub/editor/editorPocs/version/software-editor-client/node_modules/@theia/languages/node_modules/@theia/node-pty: Command failed.
Exit code: 1
Command: node scripts/install.js
Arguments:
Directory: /Users/user1/GitHub/editor/editorPocs/version/software-editor-client/node_modules/@theia/languages/node_modules/@theia/node-pty
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@6.1.0
gyp info using node@12.14.1 | darwin | x64
gyp info find Python using Python version 3.7.3 found at "/Applications/Xcode.app/Contents/Developer/usr/bin/python3"
gyp info spawn /Applications/Xcode.app/Contents/Developer/usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/Users/user1/GitHub/editor/editorPocs/version/software-editor-client/node_modules/electron-rebuild/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/user1/GitHub/editor/editorPocs/version/software-editor-client/node_modules/@theia/languages/node_modules/@theia/node-pty/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/user1/GitHub/editor/editorPocs/version/software-editor-client/node_modules/electron-rebuild/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/user1/Library/Caches/node-gyp/12.14.1',
gyp info spawn args   '-Dnode_gyp_dir=/Users/user1/GitHub/editor/editorPocs/version/software-editor-client/node_modules/electron-rebuild/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/user1/Library/Caches/node-gyp/12.14.1/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/user1/GitHub/editor/editorPocs/version/software-editor-client/node_modules/@theia/languages/node_modules/@theia/node-pty',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/pty/src/unix/pty.o
In file included from ../src/unix/pty.cc:20:
In file included from ../../../nan/nan.h:202:
In file included from ../../../nan/nan_converters.h:67:
../../../nan/nan_converters_43_inl.h:22:1: warning: 'ToBoolean' is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]
X(Boolean)
^
../../../nan/nan_converters_43_inl.h:18:12: note: expanded from macro 'X'
      val->To ## TYPE(isolate->GetCurrentContext())                            \
           ^
<scratch space>:106:1: note: expanded from here
ToBoolean
^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2567:3: note: 'ToBoolean' has been explicitly marked deprecated here
  V8_DEPRECATED("ToBoolean can never throw. Use Local version.",
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/unix/pty.cc:20:
In file included from ../../../nan/nan.h:202:
In file included from ../../../nan/nan_converters.h:67:
../../../nan/nan_converters_43_inl.h:40:1: warning: 'BooleanValue' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
X(bool, Boolean)
^
../../../nan/nan_converters_43_inl.h:37:15: note: expanded from macro 'X'
  return val->NAME ## Value(isolate->GetCurrentContext());                     \
              ^
<scratch space>:113:1: note: expanded from here
BooleanValue
^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2605:3: note: 'BooleanValue' has been explicitly marked deprecated here
  V8_DEPRECATED("BooleanValue can never throw. Use Isolate version.",
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/unix/pty.cc:20:
In file included from ../../../nan/nan.h:203:
In file included from ../../../nan/nan_new.h:189:
../../../nan/nan_implementation_12_inl.h:103:42: error: no viable conversion from 'v8::Isolate *' to 'Local<v8::Context>'
  return scope.Escape(v8::Function::New( isolate
                                         ^~~~~~~
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:183:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Isolate *' to 'const v8::Local<v8::Context> &' for 1st argument
class Local {
      ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:183:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Isolate *' to 'v8::Local<v8::Context> &&' for 1st argument
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:187:13: note: candidate template ignored: could not match 'Local<type-parameter-0-0>' against 'v8::Isolate *'
  V8_INLINE Local(Local<S> that)
            ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:4171:22: note: passing argument to parameter 'context' here
      Local<Context> context, FunctionCallback callback,
                     ^
In file included from ../src/unix/pty.cc:20:
In file included from ../../../nan/nan.h:203:
In file included from ../../../nan/nan_new.h:189:
../../../nan/nan_implementation_12_inl.h:337:37: error: too few arguments to function call, expected 2, have 1
  return v8::StringObject::New(value).As<v8::StringObject>();
         ~~~~~~~~~~~~~~~~~~~~~      ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:5426:3: note: 'New' declared here
  static Local<Value> New(Isolate* isolate, Local<String> value);
  ^
In file included from ../src/unix/pty.cc:20:
../../../nan/nan.h:1034:44: error: no matching member function for call to 'ToString'
      v8::Local<v8::String> string = from->ToString();
                                     ~~~~~~^~~~~~~~
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2572:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2588:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                Local<String> ToString(Isolate* isolate) const);
                              ^
In file included from ../src/unix/pty.cc:20:
../../../nan/nan.h:1044:37: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'char *'
        length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
                                    ^~~~
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2782:26: note: passing argument to parameter 'isolate' here
  int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
                         ^
In file included from ../src/unix/pty.cc:20:
../../../nan/nan.h:1818:28: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
                           ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/unix/pty.cc:20:
../../../nan/nan.h:1824:28: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    New(persistentHandle)->Set(key, value);
                           ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/unix/pty.cc:20:
../../../nan/nan.h:1830:28: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    New(persistentHandle)->Set(index, value);
                           ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/unix/pty.cc:20:
../../../nan/nan.h:1836:32: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
        New(persistentHandle)->Get(New(key).ToLocalChecked()));
                               ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:3457:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/unix/pty.cc:20:
../../../nan/nan.h:1842:48: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
    return scope.Escape(New(persistentHandle)->Get(key));
                                               ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:3457:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/unix/pty.cc:20:
../../../nan/nan.h:1847:48: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
    return scope.Escape(New(persistentHandle)->Get(index));
                                               ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:3461:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(uint32_t index));
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/unix/pty.cc:20:
In file included from ../../../nan/nan.h:2657:
../../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    assert(persistent().IsNearDeath());
           ~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from ../src/unix/pty.cc:20:
In file included from ../../../nan/nan.h:2657:
../../../nan/nan_object_wrap.h:67:18: warning: 'MarkIndependent' is deprecated: Weak objects are always considered independent. Use TracedGlobal when trying to use EmbedderHeapTracer. Use a strong handle when trying to keep an object alive. [-Wdeprecated-declarations]
    persistent().MarkIndependent();
                 ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:563:3: note: 'MarkIndependent' has been explicitly marked deprecated here
  V8_DEPRECATED(
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/unix/pty.cc:20:
In file included from ../../../nan/nan.h:2657:
../../../nan/nan_object_wrap.h:124:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    assert(wrap->handle_.IsNearDeath());
           ~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
../src/unix/pty.cc:185:39: error: no matching member function for call to 'ToString'
  v8::String::Utf8Value file(info[0]->ToString());
                             ~~~~~~~~~^~~~~~~~
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2572:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2588:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                Local<String> ToString(Isolate* isolate) const);
                              ^
../src/unix/pty.cc:196:69: error: no matching member function for call to 'ToString'
    v8::String::Utf8Value arg(argv_->Get(Nan::New<v8::Integer>(i))->ToString());
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2572:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2588:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                Local<String> ToString(Isolate* isolate) const);
                              ^
../src/unix/pty.cc:196:38: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
    v8::String::Utf8Value arg(argv_->Get(Nan::New<v8::Integer>(i))->ToString());
                                     ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:3457:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/unix/pty.cc:207:69: error: no matching member function for call to 'ToString'
    v8::String::Utf8Value pair(env_->Get(Nan::New<v8::Integer>(i))->ToString());
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2572:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2588:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                Local<String> ToString(Isolate* isolate) const);
                              ^
../src/unix/pty.cc:207:38: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
    v8::String::Utf8Value pair(env_->Get(Nan::New<v8::Integer>(i))->ToString());
                                     ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:3457:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/unix/pty.cc:212:39: error: no matching member function for call to 'ToString'
  v8::String::Utf8Value cwd_(info[3]->ToString());
                             ~~~~~~~~~^~~~~~~~
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2572:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2588:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                Local<String> ToString(Isolate* isolate) const);
                              ^
../src/unix/pty.cc:217:39: error: too few arguments to function call, single argument 'context' was not specified
  winp.ws_col = info[4]->IntegerValue();
                ~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2609:3: note: 'IntegerValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/unix/pty.cc:218:39: error: too few arguments to function call, single argument 'context' was not specified
  winp.ws_row = info[5]->IntegerValue();
                ~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2609:3: note: 'IntegerValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/unix/pty.cc:226:16: error: no matching member function for call to 'ToBoolean'
  if (info[8]->ToBoolean()->Value()) {
      ~~~~~~~~~^~~~~~~~~
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2568:59: note: candidate function not viable: requires single argument 'context', but no arguments were provided
                V8_WARN_UNUSED_RESULT MaybeLocal<Boolean> ToBoolean(
                                                          ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2584:18: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
  Local<Boolean> ToBoolean(Isolate* isolate) const;
                 ^
../src/unix/pty.cc:261:35: error: too few arguments to function call, single argument 'context' was not specified
  int uid = info[6]->IntegerValue();
            ~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2609:3: note: 'IntegerValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/unix/pty.cc:262:35: error: too few arguments to function call, single argument 'context' was not specified
  int gid = info[7]->IntegerValue();
            ~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2609:3: note: 'IntegerValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/unix/pty.cc:422:39: error: too few arguments to function call, single argument 'context' was not specified
  winp.ws_col = info[0]->IntegerValue();
                ~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2609:3: note: 'IntegerValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/unix/pty.cc:423:39: error: too few arguments to function call, single argument 'context' was not specified
  winp.ws_row = info[1]->IntegerValue();
                ~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2609:3: note: 'IntegerValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/unix/pty.cc:467:34: error: too few arguments to function call, single argument 'context' was not specified
  int fd = info[0]->IntegerValue();
           ~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2609:3: note: 'IntegerValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/unix/pty.cc:470:39: error: too few arguments to function call, single argument 'context' was not specified
  winp.ws_col = info[1]->IntegerValue();
                ~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2609:3: note: 'IntegerValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
  ^
/Users/user1/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
11 warnings and 20 errors generated.
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/user1/GitHub/editor/editorPocs/version/software-editor-client/node_modules/electron-rebuild/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:223:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/Users/user1/.nvm/versions/node/v12.14.1/bin/node" "/Users/user1/GitHub/editor/editorPocs/version/software-editor-client/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/user1/GitHub/editor/editorPocs/version/software-editor-client/node_modules/@theia/languages/node_modules/@theia/node-pty

@manukashyap20 can you confirm if you’ve installed all the prerequisites?

For a fresh build you can:

  • cd {project name}
  • git clean -ffdx (remove node_modules, etc.)
  • rm -rf yarn.lock (remove yarn lock which may pin dependencies)
  • yarn

Additional Info:

You have a deprecated dependency: @theia/languages. Try to remove it.

I wonder how do you build the latest tag when the deprecated package was removed a couple of months ago.