question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: `make` failed with exit code: 2

See original GitHub issue

I tried installing electron-spellchecker by executing npm install electron-spellchecker --save.

The output is as follows

> @felixrieseberg/spellchecker@4.0.10 install /home/USER/PROJECT/node_modules/@felixrieseberg/spellchecker
> node-gyp rebuild

make: Verzeichnis „/home/USER/PROJECT/node_modules/@felixrieseberg/spellchecker/build“ wird betreten
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/base/md5.o
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/base/strings/string_piece.o
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/google/bdict_reader.o
../vendor/hunspell/src/google/bdict_reader.cc: In member function ‘bool hunspell::LineIterator::AdvanceAndCopy(char*, size_t)’:
../vendor/hunspell/src/google/bdict_reader.cc:670:15: warning: unused variable ‘begin’ [-Wunused-variable]
   const char* begin = reinterpret_cast<const char*>(&bdict_data_[cur_offset_]);
               ^~~~~
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/google/bdict.o
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/affentry.o
In file included from ../vendor/hunspell/src/hunspell/affentry.cxx:9:0:
../vendor/hunspell/src/hunspell/affentry.hxx:30:105: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
   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]
   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=]
          case '.': if (!pos) { // dots are not metacharacters in groups: [.]
                    ^~
../vendor/hunspell/src/hunspell/affentry.cxx:120:5: note: here
     default: {
     ^~~~~~~
../vendor/hunspell/src/hunspell/affentry.cxx: In member function ‘int SfxEntry::test_condition(const char*, const char*)’:
../vendor/hunspell/src/hunspell/affentry.cxx:503:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
         case '.': if (!pos) { // dots are not metacharacters in groups: [.]
                   ^~
../vendor/hunspell/src/hunspell/affentry.cxx:518:5: note: here
     default: {
     ^~~~~~~
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/affixmgr.o
In file included from ../vendor/hunspell/src/hunspell/affixmgr.cxx:12:0:
../vendor/hunspell/src/hunspell/affentry.hxx:30:105: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
   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]
   struct hentry *   check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
                                                                                                                  ^~~~
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/csutil.o
  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=]
                        pdict->region=NULL;
                                     ^
../vendor/hunspell/src/hunspell/dictmgr.cxx:103:21: note: here
                     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:404:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
             *info += SPELL_ORIGCAP;
../vendor/hunspell/src/hunspell/hunspell.cxx:405:6: note: here
      case NOCAP: {
      ^~~~
../vendor/hunspell/src/hunspell/hunspell.cxx:474:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
             }
             ^
../vendor/hunspell/src/hunspell/hunspell.cxx:476:6: note: here
      case INITCAP: {
      ^~~~
../vendor/hunspell/src/hunspell/hunspell.cxx: In member function ‘int Hunspell::suggest(char***, const char*)’:
../vendor/hunspell/src/hunspell/hunspell.cxx:786:30: warning: this statement may fall through [-Wimplicit-fallthrough=]
                     capwords = 1;
                     ~~~~~~~~~^~~
../vendor/hunspell/src/hunspell/hunspell.cxx:787:6: note: here
      case HUHCAP: {
      ^~~~
../vendor/hunspell/src/hunspell/hunspell.cxx:910:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
               capwords = 1;
               ~~~~~~~~~^~~
../vendor/hunspell/src/hunspell/hunspell.cxx:911:11: note: here
           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
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/parsers/textparser.o
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/base/strings/string16.o
  AR(target) Release/obj.target/hunspell.a
  COPY Release/hunspell.a
  CXX(target) Release/obj.target/spellchecker/src/main.o
../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::CheckSpelling(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:93:79: error: no matching function for call to ‘v8::String::Write(v8::Isolate*, short unsigned int*)’
     string->Write(info.GetIsolate(), reinterpret_cast<uint16_t *>(text.data()));
                                                                               ^
In file included from /home/USER/.cache/node-gyp/8.15.0/include/node/node.h:63:0,
                 from ../../../nan/nan.h:54,
                 from ../src/main.cc:2:
/home/USER/.cache/node-gyp/8.15.0/include/node/v8.h:2576:7: note: candidate: int v8::String::Write(uint16_t*, int, int, int) const
   int Write(uint16_t* buffer,
       ^~~~~
/home/USER/.cache/node-gyp/8.15.0/include/node/v8.h:2576:7: note:   no known conversion for argument 1 from ‘v8::Isolate*’ to ‘uint16_t* {aka short unsigned int*}’
spellchecker.target.mk:117: recipe for target 'Release/obj.target/spellchecker/src/main.o' failed
make: *** [Release/obj.target/spellchecker/src/main.o] Error 1
make: Verzeichnis „/home/USER/PROJECT/node_modules/@felixrieseberg/spellchecker/build“ wird verlassen
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-55-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/USER/PROJECT/node_modules/@felixrieseberg/spellchecker
gyp ERR! node -v v8.15.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN notsup Unsupported engine for cld@2.5.1: wanted: {"node":">=12.0.0"} (current: {"node":"8.15.0","npm":"6.12.0"})
npm WARN notsup Not compatible with your version of node/npm: cld@2.5.1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @felixrieseberg/spellchecker@4.0.10 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @felixrieseberg/spellchecker@4.0.10 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/USER/.npm/_logs/2019-10-29T13_26_52_947Z-debug.log

Host is Ubuntu 18.04 / 64bit.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
Circuit8commented, Jan 16, 2020

FYI it looks like Electron itself is going to support spell checking with the release of version 8 which is currently in beta.

1reaction
matheocommented, Jan 16, 2020

this package is broken and nothing happens 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

GYP ERR! build error. stack Error: 'make' failed with exit code 2
This is the error I encounter when I try to push the application via cloud foundry. This similar error happens when I npm...
Read more >
Debugging "Make Failed with Exit Code 2" Error - CodeForGeek
The “Make Failed with Exit Code 2” error occurs during the node modules installation. We see lots of stack trace including the one...
Read more >
gyp ERR! stack Error: make failed with exit code: 2 #1694
My fix was to downgrade node from 12 to 11; I was in a project created on Node 11 and then I tried...
Read more >
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
The error "npm ERR! gyp ERR! stack Error: make failed with exit code: 2" occurs when there's a glitch in your package-lock.json ......
Read more >
Build Failed with "non-zero exit code: 2" error - Support
This means you have defined a variable ( determineResult in this instance) and have not used within the page code. In all affected...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found