reZach / grammarify

Grammarify is a npm package that safely cleans up text that has mispellings, improper capitalization, lexical illusions, among other things.
MIT License
67 stars 9 forks source link

Does not built #3

Closed Lisennk closed 3 years ago

Lisennk commented 3 years ago
taras@laptop:~/work/Elomia/bot$ npm i grammarify --save

> spellchecker@3.4.4 install /home/taras/work/Elomia/bot/node_modules/spellchecker
> node-gyp rebuild

make: Entering directory '/home/taras/work/Elomia/bot/node_modules/spellchecker/build'
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/affentry.o
In file included from ../vendor/hunspell/src/hunspell/affentry.cxx:9:
../vendor/hunspell/src/hunspell/affentry.hxx:30:105: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
   30 |   struct hentry *      check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL);
      |                                                                                                         ^~~~
../vendor/hunspell/src/hunspell/affentry.hxx:93:114: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
   93 |   struct hentry *   check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
      |                                                                                                                  ^~~~
../vendor/hunspell/src/hunspell/affentry.cxx: In member function ‘int PfxEntry::test_condition(const char*)’:
../vendor/hunspell/src/hunspell/affentry.cxx:113:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
  113 |          case '.': if (!pos) { // dots are not metacharacters in groups: [.]
      |                    ^~
../vendor/hunspell/src/hunspell/affentry.cxx:120:5: note: here
  120 |     default: {
      |     ^~~~~~~
../vendor/hunspell/src/hunspell/affentry.cxx: In member function ‘int SfxEntry::test_condition(const char*, const char*)’:
../vendor/hunspell/src/hunspell/affentry.cxx:501:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
  501 |         case '.': if (!pos) { // dots are not metacharacters in groups: [.]
      |                   ^~
../vendor/hunspell/src/hunspell/affentry.cxx:516:5: note: here
  516 |     default: {
      |     ^~~~~~~
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/affixmgr.o
In file included from ../vendor/hunspell/src/hunspell/affixmgr.cxx:12:
../vendor/hunspell/src/hunspell/affentry.hxx:30:105: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
   30 |   struct hentry *      check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL);
      |                                                                                                         ^~~~
../vendor/hunspell/src/hunspell/affentry.hxx:93:114: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
   93 |   struct hentry *   check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
      |                                                                                                                  ^~~~
../vendor/hunspell/src/hunspell/affixmgr.cxx: In member function ‘int AffixMgr::parse_convtable(char*, FileMgr*, RepList**, const char*)’:
../vendor/hunspell/src/hunspell/affixmgr.cxx:3654:58: warning: argument to ‘sizeof’ in ‘int strncmp(const char*, const char*, size_t)’ call is the same expression as the second source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
 3654 |                              if (strncmp(piece, keyword, sizeof(keyword)) != 0) {
      |                                                          ^~~~~~~~~~~~~~~
In file included from /usr/include/string.h:495,
                 from ../vendor/hunspell/src/hunspell/affixmgr.cxx:5:
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘int AffixMgr::encodeit(affentry&, char*)’ at ../vendor/hunspell/src/hunspell/affixmgr.cxx:1075:12:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound 20 equals destination size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/csutil.o
In file included from /usr/include/string.h:495,
                 from ../vendor/hunspell/src/hunspell/csutil.cxx:5:
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘void strlinecat(char*, const char*)’ at ../vendor/hunspell/src/hunspell/csutil.cxx:411:24:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../vendor/hunspell/src/hunspell/csutil.cxx: In function ‘void strlinecat(char*, const char*)’:
../vendor/hunspell/src/hunspell/csutil.cxx:407:21: note: length computed here
  407 |     int len = strlen(s);
      |               ~~~~~~^~~
In file included from /usr/include/string.h:495,
                 from ../vendor/hunspell/src/hunspell/csutil.cxx:5:
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘char* mystrrep(char*, const char*, const char*)’ at ../vendor/hunspell/src/hunspell/csutil.cxx:567:16:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../vendor/hunspell/src/hunspell/csutil.cxx: In function ‘char* mystrrep(char*, const char*, const char*)’:
../vendor/hunspell/src/hunspell/csutil.cxx:552:26: note: length computed here
  552 |       int replen = strlen(rep);
      |                    ~~~~~~^~~~~
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/dictmgr.o
../vendor/hunspell/src/hunspell/dictmgr.cxx: In member function ‘int DictMgr::parse_file(const char*, const char*)’:
../vendor/hunspell/src/hunspell/dictmgr.cxx:102:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
  102 |                        pdict->region=NULL;
      |                                     ^
../vendor/hunspell/src/hunspell/dictmgr.cxx:103:21: note: here
  103 |                     case 2: //deliberate fallthrough
      |                     ^~~~
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/filemgr.o
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/hashmgr.o
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/hunspell.o
../vendor/hunspell/src/hunspell/hunspell.cxx: In member function ‘int Hunspell::spell(const char*, int*, char**)’:
../vendor/hunspell/src/hunspell/hunspell.cxx:369:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
  369 |             *info += SPELL_ORIGCAP;
../vendor/hunspell/src/hunspell/hunspell.cxx:370:6: note: here
  370 |      case NOCAP: {
      |      ^~~~
../vendor/hunspell/src/hunspell/hunspell.cxx:439:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
  439 |             }
      |             ^
../vendor/hunspell/src/hunspell/hunspell.cxx:441:6: note: here
  441 |      case INITCAP: {
      |      ^~~~
../vendor/hunspell/src/hunspell/hunspell.cxx: In member function ‘int Hunspell::suggest(char***, const char*)’:
../vendor/hunspell/src/hunspell/hunspell.cxx:741:30: warning: this statement may fall through [-Wimplicit-fallthrough=]
  741 |                     capwords = 1;
      |                     ~~~~~~~~~^~~
../vendor/hunspell/src/hunspell/hunspell.cxx:742:6: note: here
  742 |      case HUHCAP: {
      |      ^~~~
../vendor/hunspell/src/hunspell/hunspell.cxx:865:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
  865 |               capwords = 1;
      |               ~~~~~~~~~^~~
../vendor/hunspell/src/hunspell/hunspell.cxx:866:11: note: here
  866 |           case HUHCAP: {
      |           ^~~~
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/hunzip.o
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/phonet.o
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/replist.o
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/suggestmgr.o
In file included from /usr/include/string.h:495,
                 from ../vendor/hunspell/src/hunspell/suggestmgr.cxx:5:
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘char* SuggestMgr::suggest_gen(char**, int, char*)’ at ../vendor/hunspell/src/hunspell/suggestmgr.cxx:1723:12:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/parsers/textparser.o
  AR(target) Release/obj.target/hunspell.a
  COPY Release/hunspell.a
  CXX(target) Release/obj.target/spellchecker/src/main.o
../src/main.cc:195:20: error: ‘Handle’ has not been declared
  195 |   static void Init(Handle<Object> exports) {
      |                    ^~~~~~
../src/main.cc:195:26: error: expected ‘,’ or ‘...’ before ‘<’ token
  195 |   static void Init(Handle<Object> exports) {
      |                          ^
../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::SetDictionary(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:33:54: error: no matching function for call to ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’
   33 |     std::string language = *String::Utf8Value(info[0]);
      |                                                      ^
In file included from /home/taras/.cache/node-gyp/12.20.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/main.cc:3:
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note: candidate: ‘v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>)’
 3135 |     Utf8Value(Isolate* isolate, Local<v8::Value> obj);
      |     ^~~~~~~~~
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note:   candidate expects 2 arguments, 1 provided
../src/main.cc:36:45: error: no matching function for call to ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’
   36 |       directory = *String::Utf8Value(info[1]);
      |                                             ^
In file included from /home/taras/.cache/node-gyp/12.20.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/main.cc:3:
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note: candidate: ‘v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>)’
 3135 |     Utf8Value(Isolate* isolate, Local<v8::Value> obj);
      |     ^~~~~~~~~
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note:   candidate expects 2 arguments, 1 provided
../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::IsMisspelled(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:50:50: error: no matching function for call to ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’
   50 |     std::string word = *String::Utf8Value(info[0]);
      |                                                  ^
In file included from /home/taras/.cache/node-gyp/12.20.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/main.cc:3:
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note: candidate: ‘v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>)’
 3135 |     Utf8Value(Isolate* isolate, Local<v8::Value> obj);
      |     ^~~~~~~~~
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note:   candidate expects 2 arguments, 1 provided
../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::CheckSpelling(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:61:5: error: ‘Handle’ was not declared in this scope; did you mean ‘handle’?
   61 |     Handle<String> string = Handle<String>::Cast(info[0]);
      |     ^~~~~~
      |     handle
../src/main.cc:61:18: error: expected primary-expression before ‘>’ token
   61 |     Handle<String> string = Handle<String>::Cast(info[0]);
      |                  ^
../src/main.cc:61:20: error: ‘string’ was not declared in this scope; did you mean ‘std::string’?
   61 |     Handle<String> string = Handle<String>::Cast(info[0]);
      |                    ^~~~~~
      |                    std::string
In file included from /usr/include/c++/9/iosfwd:39,
                 from /usr/include/c++/9/memory:72,
                 from /home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:21,
                 from /home/taras/.cache/node-gyp/12.20.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/main.cc:3:
/usr/include/c++/9/bits/stringfwd.h:79:33: note: ‘std::string’ declared here
   79 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
../src/main.cc:61:42: error: expected primary-expression before ‘>’ token
   61 |     Handle<String> string = Handle<String>::Cast(info[0]);
      |                                          ^
../src/main.cc:61:45: error: ‘::Cast’ has not been declared
   61 |     Handle<String> string = Handle<String>::Cast(info[0]);
      |                                             ^~~~
../src/main.cc:85:89: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   85 |       misspelled_range->Set(Nan::New("start").ToLocalChecked(), Nan::New<Integer>(start));
      |                                                                                         ^
In file included from /home/taras/.cache/node-gyp/12.20.0/include/node/v8-internal.h:14,
                 from /home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:27,
                 from /home/taras/.cache/node-gyp/12.20.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/main.cc:3:
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3499:22: note: declared here
 3499 |                 bool Set(Local<Value> key, Local<Value> value));
      |                      ^~~
/home/taras/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
../src/main.cc:86:85: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   86 |       misspelled_range->Set(Nan::New("end").ToLocalChecked(), Nan::New<Integer>(end));
      |                                                                                     ^
In file included from /home/taras/.cache/node-gyp/12.20.0/include/node/v8-internal.h:14,
                 from /home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:27,
                 from /home/taras/.cache/node-gyp/12.20.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/main.cc:3:
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3499:22: note: declared here
 3499 |                 bool Set(Local<Value> key, Local<Value> value));
      |                      ^~~
/home/taras/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
../src/main.cc:87:42: warning: ‘bool v8::Object::Set(uint32_t, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   87 |       result->Set(index, misspelled_range);
      |                                          ^
In file included from /home/taras/.cache/node-gyp/12.20.0/include/node/v8-internal.h:14,
                 from /home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:27,
                 from /home/taras/.cache/node-gyp/12.20.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/main.cc:3:
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3508:22: note: declared here
 3508 |                 bool Set(uint32_t index, Local<Value> value));
      |                      ^~~
/home/taras/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::CheckSpellingAsync(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:97:5: error: ‘Handle’ was not declared in this scope; did you mean ‘handle’?
   97 |     Handle<String> string = Handle<String>::Cast(info[0]);
      |     ^~~~~~
      |     handle
../src/main.cc:97:18: error: expected primary-expression before ‘>’ token
   97 |     Handle<String> string = Handle<String>::Cast(info[0]);
      |                  ^
../src/main.cc:97:20: error: ‘string’ was not declared in this scope; did you mean ‘std::string’?
   97 |     Handle<String> string = Handle<String>::Cast(info[0]);
      |                    ^~~~~~
      |                    std::string
In file included from /usr/include/c++/9/iosfwd:39,
                 from /usr/include/c++/9/memory:72,
                 from /home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:21,
                 from /home/taras/.cache/node-gyp/12.20.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/main.cc:3:
/usr/include/c++/9/bits/stringfwd.h:79:33: note: ‘std::string’ declared here
   79 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
../src/main.cc:97:42: error: expected primary-expression before ‘>’ token
   97 |     Handle<String> string = Handle<String>::Cast(info[0]);
      |                                          ^
../src/main.cc:97:45: error: ‘::Cast’ has not been declared
   97 |     Handle<String> string = Handle<String>::Cast(info[0]);
      |                                             ^~~~
../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::Add(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:120:50: error: no matching function for call to ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’
  120 |     std::string word = *String::Utf8Value(info[0]);
      |                                                  ^
In file included from /home/taras/.cache/node-gyp/12.20.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/main.cc:3:
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note: candidate: ‘v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>)’
 3135 |     Utf8Value(Isolate* isolate, Local<v8::Value> obj);
      |     ^~~~~~~~~
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note:   candidate expects 2 arguments, 1 provided
../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::Remove(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:133:50: error: no matching function for call to ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’
  133 |     std::string word = *String::Utf8Value(info[0]);
      |                                                  ^
In file included from /home/taras/.cache/node-gyp/12.20.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/main.cc:3:
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note: candidate: ‘v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>)’
 3135 |     Utf8Value(Isolate* isolate, Local<v8::Value> obj);
      |     ^~~~~~~~~
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note:   candidate expects 2 arguments, 1 provided
../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::GetAvailableDictionaries(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:147:52: error: no matching function for call to ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’
  147 |       std::string path = *String::Utf8Value(info[0]);
      |                                                    ^
In file included from /home/taras/.cache/node-gyp/12.20.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/main.cc:3:
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note: candidate: ‘v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>)’
 3135 |     Utf8Value(Isolate* isolate, Local<v8::Value> obj);
      |     ^~~~~~~~~
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note:   candidate expects 2 arguments, 1 provided
../src/main.cc:156:73: warning: ‘bool v8::Object::Set(uint32_t, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
  156 |       result->Set(i, Nan::New(dict.data(), dict.size()).ToLocalChecked());
      |                                                                         ^
In file included from /home/taras/.cache/node-gyp/12.20.0/include/node/v8-internal.h:14,
                 from /home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:27,
                 from /home/taras/.cache/node-gyp/12.20.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/main.cc:3:
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3508:22: note: declared here
 3508 |                 bool Set(uint32_t index, Local<Value> value));
      |                      ^~~
/home/taras/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::GetCorrectionsForMisspelling(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:170:50: error: no matching function for call to ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’
  170 |     std::string word = *String::Utf8Value(info[0]);
      |                                                  ^
In file included from /home/taras/.cache/node-gyp/12.20.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/main.cc:3:
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note: candidate: ‘v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>)’
 3135 |     Utf8Value(Isolate* isolate, Local<v8::Value> obj);
      |     ^~~~~~~~~
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note:   candidate expects 2 arguments, 1 provided
../src/main.cc:179:42: warning: ‘bool v8::Object::Set(uint32_t, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
  179 |       result->Set(i, val.ToLocalChecked());
      |                                          ^
In file included from /home/taras/.cache/node-gyp/12.20.0/include/node/v8-internal.h:14,
                 from /home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:27,
                 from /home/taras/.cache/node-gyp/12.20.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/main.cc:3:
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:3508:22: note: declared here
 3508 |                 bool Set(uint32_t index, Local<Value> value));
      |                      ^~~
/home/taras/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
../src/main.cc: In static member function ‘static void {anonymous}::Spellchecker::Init(int)’:
../src/main.cc:210:5: error: ‘exports’ was not declared in this scope
  210 |     exports->Set(Nan::New("Spellchecker").ToLocalChecked(), tpl->GetFunction());
      |     ^~~~~~~
../src/main.cc:210:78: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
  210 |     exports->Set(Nan::New("Spellchecker").ToLocalChecked(), tpl->GetFunction());
      |                                                                              ^
In file included from /home/taras/.cache/node-gyp/12.20.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/main.cc:3:
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:6126:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
 6126 |   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      |                                              ^~~~~~~~~~~
/home/taras/.cache/node-gyp/12.20.0/include/node/v8.h:6126:46: note:   candidate expects 1 argument, 0 provided
../src/main.cc: At global scope:
../src/main.cc:214:11: error: variable or field ‘Init’ declared void
  214 | void Init(Handle<Object> exports, Handle<Object> module) {
      |           ^~~~~~
../src/main.cc:214:11: error: ‘Handle’ was not declared in this scope
../src/main.cc:214:24: error: expected primary-expression before ‘>’ token
  214 | void Init(Handle<Object> exports, Handle<Object> module) {
      |                        ^
../src/main.cc:214:26: error: ‘exports’ was not declared in this scope
  214 | void Init(Handle<Object> exports, Handle<Object> module) {
      |                          ^~~~~~~
../src/main.cc:214:35: error: ‘Handle’ was not declared in this scope
  214 | void Init(Handle<Object> exports, Handle<Object> module) {
      |                                   ^~~~~~
../src/main.cc:214:48: error: expected primary-expression before ‘>’ token
  214 | void Init(Handle<Object> exports, Handle<Object> module) {
      |                                                ^
../src/main.cc:214:50: error: ‘module’ was not declared in this scope
  214 | void Init(Handle<Object> exports, Handle<Object> module) {
      |                                                  ^~~~~~
In file included from ../../nan/nan.h:56,
                 from ../src/main.cc:3:
../src/main.cc:220:27: error: ‘Init’ was not declared in this scope; did you mean ‘node::Init’?
  220 | NODE_MODULE(spellchecker, Init)
      |                           ^~~~
/home/taras/.cache/node-gyp/12.20.0/include/node/node.h:737:36: note: in definition of macro ‘NODE_MODULE_X’
  737 |       (node::addon_register_func) (regfunc),                          \
      |                                    ^~~~~~~
../src/main.cc:220:1: note: in expansion of macro ‘NODE_MODULE’
  220 | NODE_MODULE(spellchecker, Init)
      | ^~~~~~~~~~~
/home/taras/.cache/node-gyp/12.20.0/include/node/node.h:230:18: note: ‘node::Init’ declared here
  230 | NODE_EXTERN void Init(int* argc,
      |                  ^~~~
make: *** [spellchecker.target.mk:124: Release/obj.target/spellchecker/src/main.o] Error 1
make: Leaving directory '/home/taras/work/Elomia/bot/node_modules/spellchecker/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/taras/.nvm/versions/node/v12.20.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.8.0-43-generic
gyp ERR! command "/home/taras/.nvm/versions/node/v12.20.0/bin/node" "/home/taras/.nvm/versions/node/v12.20.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/taras/work/Elomia/bot/node_modules/spellchecker
gyp ERR! node -v v12.20.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN elomia-server@1.0.0 No description
npm WARN elomia-server@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! spellchecker@3.4.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the spellchecker@3.4.4 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/taras/.npm/_logs/2021-02-15T12_37_03_715Z-debug.log
reZach commented 3 years ago

@Lisennk what version of the package do you have installed? What operating system are you on?

Lisennk commented 3 years ago

Last / Last Ubuntu. The problem is with outdated dependency. Check out my version: https://github.com/Lisennk/grammarify/commit/2395b0ff54cfb022289ff9bcd941fa4c8d25ab4f

reZach commented 3 years ago

Thank you @Lisennk, I've published a new version with the latest version of the dependency.