Skip to content

Instantly share code, notes, and snippets.

@roberto68
Created May 15, 2017 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roberto68/6297f762221b145fcd0284fcd5ee1171 to your computer and use it in GitHub Desktop.
Save roberto68/6297f762221b145fcd0284fcd5ee1171 to your computer and use it in GitHub Desktop.
npm install error, patchwork
npm install
> keyboard-layout@2.0.12 install /home/roberto/bin/patchwork-source/node_modules/keyboard-layout
> node-gyp rebuild
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory '/home/roberto/bin/patchwork-source/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
compilation terminated.
keyboard-layout-manager.target.mk:96: recipe for target 'Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager-linux.o' failed
make: *** [Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager-linux.o] Error 1
make: Leaving directory '/home/roberto/bin/patchwork-source/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/roberto/.nvm/versions/node/v7.4.0/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:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-70-generic
gyp ERR! command "/home/roberto/.nvm/versions/node/v7.4.0/bin/node" "/home/roberto/.nvm/versions/node/v7.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/roberto/bin/patchwork-source/node_modules/keyboard-layout
gyp ERR! node -v v7.4.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
ssb-patchwork@3.3.3 /home/roberto/bin/patchwork-source
└── (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.4.0-70-generic
npm ERR! argv "/home/roberto/.nvm/versions/node/v7.4.0/bin/node" "/home/roberto/.nvm/versions/node/v7.4.0/bin/npm" "install"
npm ERR! node v7.4.0
npm ERR! npm v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! keyboard-layout@2.0.12 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the keyboard-layout@2.0.12 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/roberto/bin/patchwork-source/npm-debug.log
@roberto68
Copy link
Author

so I tried node-gyp rebuild and I get
gyp info it worked if it ends with ok gyp info using node-gyp@3.0.3 gyp info using node@4.2.6 | linux | x64 gyp info spawn python2 gyp info spawn args [ '/usr/share/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/roberto/bin/patchwork-source/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/usr/share/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/usr/include/nodejs/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/usr/include/nodejs', gyp info spawn args '-Dnode_gyp_dir=/usr/share/node-gyp', gyp info spawn args '-Dnode_lib_file=node.lib', gyp info spawn args '-Dmodule_root_dir=/home/roberto/bin/patchwork-source', 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: binding.gyp not found (cwd: /home/roberto/bin/patchwork-source) while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gypfailed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:354:16) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Linux 4.4.0-70-generic gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /home/roberto/bin/patchwork-source gyp ERR! node -v v4.2.6 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok

@BeeChains
Copy link

BeeChains commented Apr 11, 2020

Thank you in advance!! All TLC Scuttlebutt welcome, trying to Scuttlebutt raspberry pi 3b+!!!

atom/keyboard-layout#37 (comment)

~/patchwork $ npm start patchwork

ssb-patchwork@3.17.7 start /home/pi/patchwork
electron index.js "patchwork"

/home/pi/patchwork/node_modules/electron/index.js:14
throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')
^

Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
at getElectronPath (/home/pi/patchwork/node_modules/electron/index.js:14:11)
at Object. (/home/pi/patchwork/node_modules/electron/index.js:18:18)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (/home/pi/patchwork/node_modules/electron/cli.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ssb-patchwork@3.17.7 start: electron index.js "patchwork"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ssb-patchwork@3.17.7 start 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/pi/.npm/_logs/2020-04-11T20_46_39_842Z-debug.log

~/patchwork $ rm -rf node_modules/electron
~/patchwork $ npm install

@felixrieseberg/spellchecker@4.0.12 install /home/pi/patchwork/node_modules/@felixrieseberg/spellchecker
node-gyp rebuild

make: Entering directory '/home/pi/patchwork/node_modules/@felixrieseberg/spellchecker/build'
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:
../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:
../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/affixmgr.cxx: In member function ‘int AffixMgr::encodeit(affentry&, char*)’:
../vendor/hunspell/src/hunspell/affixmgr.cxx:1141:12: warning: ‘char* strncpy(char*, const char*, size_t)’ specified bound 20 equals destination size [-Wstringop-truncation]
strncpy(entry.c.conds, cs, MAXCONDLEN);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/csutil.o
../vendor/hunspell/src/hunspell/csutil.cxx: In function ‘void strlinecat(char*, const char*)’:
../vendor/hunspell/src/hunspell/csutil.cxx:411:24: warning: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(dest, s, len);
~~~~~~~^~~~~~~~~~~~~~
../vendor/hunspell/src/hunspell/csutil.cxx:407:21: note: length computed here
int len = strlen(s);
~~~~~~^~~
../vendor/hunspell/src/hunspell/csutil.cxx: In function ‘char* mystrrep(char*, const char*, const char*)’:
../vendor/hunspell/src/hunspell/csutil.cxx:567:16: warning: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(pos, rep, replen);
~~~~~~~^~~~~~~~~~~~~~~~~~
../vendor/hunspell/src/hunspell/csutil.cxx:552:26: note: length computed here
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=]
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
../vendor/hunspell/src/hunspell/suggestmgr.cxx: In member function ‘char* SuggestMgr::suggest_gen(char**, int, char*)’:
../vendor/hunspell/src/hunspell/suggestmgr.cxx:1883:12: warning: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation]
strncpy(ds, MORPH_TERM_SFX, MORPH_TAG_LEN);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
In file included from ../src/main.cc:2:
../../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
, reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
^
In file included from ../../../nan/nan.h:54,
from ../src/main.cc:2:
../src/main.cc: At global scope:
/home/pi/.cache/node-gyp/13.12.0/include/node/node.h:618:43: warning: cast between incompatible function types from ‘void ()(v8::Localv8::Object, v8::Localv8::Object)’ to ‘node::addon_register_func’ {aka ‘void ()(v8::Localv8::Object, v8::Localv8::Value, void*)’} [-Wcast-function-type]
(node::addon_register_func) (regfunc),
^
/home/pi/.cache/node-gyp/13.12.0/include/node/node.h:652:3: note: in expansion of macro ‘NODE_MODULE_X’
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/main.cc:228:1: note: in expansion of macro ‘NODE_MODULE’
NODE_MODULE(spellchecker, Init)
^~~~~~~~~~~
CXX(target) Release/obj.target/spellchecker/src/spellchecker_hunspell.o
CXX(target) Release/obj.target/spellchecker/src/spellchecker_linux.o
CXX(target) Release/obj.target/spellchecker/src/transcoder_posix.o
SOLINK_MODULE(target) Release/obj.target/spellchecker.node
COPY Release/spellchecker.node
make: Leaving directory '/home/pi/patchwork/node_modules/@felixrieseberg/spellchecker/build'

keyboard-layout@2.0.16 install /home/pi/patchwork/node_modules/keyboard-layout
node-gyp rebuild

make: Entering directory '/home/pi/patchwork/node_modules/keyboard-layout/build'
CXX(target) Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager.o
In file included from ../src/keyboard-layout-manager.cc:1:
../src/keyboard-layout-manager.h:7:10: fatal error: X11/Xlib.h: No such file or directory
#include <X11/Xlib.h>
^~~~~~~~~~~~
compilation terminated.
make: *** [keyboard-layout-manager.target.mk:112: Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager.o] Error 1
make: Leaving directory '/home/pi/patchwork/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/pi/.config/versions/node/v13.12.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.97-v7+
gyp ERR! command "/home/pi/.config/versions/node/v13.12.0/bin/node" "/home/pi/.config/versions/node/v13.12.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/patchwork/node_modules/keyboard-layout
gyp ERR! node -v v13.12.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! keyboard-layout@2.0.16 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the keyboard-layout@2.0.16 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/pi/.npm/_logs/2020-04-11T21_02_42_348Z-debug.log

~/patchwork $ npm doctor
npm notice PING https://registry.npmjs.org/
npm WARN verifyCachedFiles Content garbage-collected: 2 (68629 bytes)
npm WARN verifyCachedFiles Cache issues have been fixed
Check Value Recommendation
npm ping ok
npm -v v6.14.4
node -v v13.12.0
npm config get registry https://registry.npmjs.org/
which git /usr/bin/git
Perms check on cached files ok
Perms check on global node_modules ok
Perms check on local node_modules ok
Verify cache contents verified 2379 tarballs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment