atom / node-spellchecker

SpellChecker Node Module
http://atom.github.io/node-spellchecker
MIT License
298 stars 106 forks source link

Error while compiling spell checker MacOS Catalina Node 14.5 #134

Open jmcanterafonseca-iota opened 4 years ago

jmcanterafonseca-iota commented 4 years ago

I have a Node.js (version 14.5) project with a dependency of spellchecker ^3.7.0 and while npm install the following errors appear:


> spellchecker@3.7.0 install /Users/jmcf/work/IOTA/docs/documentation/node_modules/spellchecker
> node-gyp rebuild

                                      ^
../src/main.cc:137:25: error: no matching member function for call to 'Set'
      misspelled_range->Set(Nan::New("start").ToLocalChecked(), Nan::New<Integer>(start));
      ~~~~~~~~~~~~~~~~~~^~~
/Users/jmcf/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3666:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/jmcf/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3669:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/main.cc:138:25: error: no matching member function for call to 'Set'
      misspelled_range->Set(Nan::New("end").ToLocalChecked(), Nan::New<Integer>(end));
      ~~~~~~~~~~~~~~~~~~^~~
/Users/jmcf/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3666:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/jmcf/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3669:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/main.cc:139:15: error: no matching member function for call to 'Set'
      result->Set(index, misspelled_range);
      ~~~~~~~~^~~
/Users/jmcf/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3666:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/jmcf/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3669:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/main.cc:223:15: error: no matching member function for call to 'Set'
      result->Set(i, Nan::New(dict.data(), dict.size()).ToLocalChecked());
      ~~~~~~~~^~~
/Users/jmcf/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3666:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/jmcf/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3669:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/main.cc:249:15: error: no matching member function for call to 'Set'
      result->Set(i, val.ToLocalChecked());
      ~~~~~~~~^~~
/Users/jmcf/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3666:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/jmcf/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3669:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/main.cc:289:14: error: no matching member function for call to 'Set'
    exports->Set(Nan::New("Spellchecker").ToLocalChecked(), tpl->GetFunction(context).ToLocalChecked());
    ~~~~~~~~~^~~
/Users/jmcf/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3666:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/jmcf/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3669:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
1 warning and 6 errors generated.
make: *** [Release/obj.target/spellchecker/src/main.o] Error 1
darangi commented 4 years ago

Hi @jmcanterafonseca-iota, we currently node 14. However, a PR is welcomed 😃

abetomo commented 4 years ago

Please review as there are several PRs that resolve this error.

120

130

135

garethnunns commented 4 years ago

Getting the same error with Node 14.2, macOS 10.14.6 (Mojave) & spellchecker 3.7.0