electron-userland / electron-spellchecker

Implement spellchecking, correctly
MIT License
237 stars 83 forks source link

node-gyp rebuild fails for keyboard-layout@2.0.13 #91

Closed edmoresamewave closed 6 years ago

edmoresamewave commented 6 years ago

Error extract:

> keyboard-layout@2.0.13 install
> node-gyp rebuild
make: Entering directory `/home/travis/build/.../node_modules/keyboard-layout/build'
  CXX(target) Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager-linux.o
../src/keyboard-layout-manager-linux.cc:5:37: fatal error: X11/extensions/XKBrules.h: No such file or directory
 #include <X11/extensions/XKBrules.h>
                                     ^
compilation terminated.
make: *** [Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager-linux.o] Error 1
make: Leaving directory `/home/travis/build/.../node_modules/keyboard-layout/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/travis/.nvm/versions/node/v7.10.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:194:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-93-generic
gyp ERR! command "/home/travis/.nvm/versions/node/v7.10.1/bin/node" "/home/travis/.nvm/versions/node/v7.10.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/travis/build/.../node_modules/keyboard-layout
gyp ERR! node -v v7.10.1
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok 
 /home/travis/build/...
└── (empty)
npm ERR! Linux 4.4.0-93-generic
npm ERR! argv "/home/travis/.nvm/versions/node/v7.10.1/bin/node" "/home/travis/.nvm/versions/node/v7.10.1/bin/npm" "install"
npm ERR! node v7.10.1
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! keyboard-layout@2.0.13 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the keyboard-layout@2.0.13 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the keyboard-layout package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs keyboard-layout
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls keyboard-layout
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /home/travis/.npm/_logs/2017-09-20T11_38_38_297Z-debug.log
The command "npm install" failed and exited with 1 during .

Kindly assist. I am seeing this error on a Travis CI build.

edmoresamewave commented 6 years ago

Sorted by

sudo apt-get install libxkbfile-dev

masterzion commented 5 years ago

Sorted by

sudo apt-get install libxkbfile-dev

I think this information should be added on the README.md file

patilrevansidh commented 4 years ago

sudo apt-get install libxkbfile-dev worked on Ubuntu. But what about windows. yarn fails eror:

Warning: Missing input files: C:\Users\Dell\work\DHC\node_modules\@felixrieseberg\spellchecker\build\..\vendor\hunspell\src\build\build.h gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe