fivdi / epoll

A low-level Node.js binding for the Linux epoll API
MIT License
84 stars 13 forks source link

Ubuntu 18.04 Server fails to install @node-gyp rebuild #36

Closed engineertdog closed 5 years ago

engineertdog commented 5 years ago

I'm running a clean install of Ubuntu 18.04 Server on a raspberry PI with Node v10.16.0 and NPM v6.9.0. As the ubuntu user, I am trying to install onoff, and only onoff, with one npm install command. Attached is the full output from npm install onoff

0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', 'onoff' ] 2 info using npm@6.9.0 3 info using node@v10.16.0 4 verbose npm-session 16df9898dbc21df5 5 silly install loadCurrentTree 6 silly install readLocalPackageData 7 http fetch GET 200 https://registry.npmjs.org/onoff 103ms (from cache) 8 silly pacote tag manifest for onoff@latest fetched in 155ms 9 timing stage:loadCurrentTree Completed in 1108ms 10 silly install loadIdealTree 11 silly install cloneCurrentTreeToIdealTree 12 timing stage:loadIdealTree:cloneCurrentTree Completed in 9ms 13 silly install loadShrinkwrap 14 timing stage:loadIdealTree:loadShrinkwrap Completed in 513ms 15 silly install loadAllDepsIntoIdealTree 16 silly resolveWithNewModule onoff@4.1.2 checking installable status 17 http fetch GET 200 https://registry.npmjs.org/epoll 176ms (from cache) 18 silly pacote range manifest for epoll@^2.0.9 fetched in 197ms 19 silly resolveWithNewModule epoll@2.0.9 checking installable status 20 http fetch GET 304 https://registry.npmjs.org/lodash.debounce 421ms (from cache) 21 silly pacote range manifest for lodash.debounce@^4.0.8 fetched in 431ms 22 silly resolveWithNewModule lodash.debounce@4.0.8 checking installable status 23 http fetch GET 200 https://registry.npmjs.org/bindings 54ms (from cache) 24 silly pacote range manifest for bindings@^1.5.0 fetched in 63ms 25 silly resolveWithNewModule bindings@1.5.0 checking installable status 26 http fetch GET 304 https://registry.npmjs.org/nan 123ms (from cache) 27 silly pacote range manifest for nan@^2.13.0 fetched in 135ms 28 silly resolveWithNewModule nan@2.14.0 checking installable status 29 http fetch GET 304 https://registry.npmjs.org/file-uri-to-path 84ms (from cache) 30 silly pacote version manifest for file-uri-to-path@1.0.0 fetched in 91ms 31 silly resolveWithNewModule file-uri-to-path@1.0.0 checking installable status 32 timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 1353ms 33 timing stage:loadIdealTree Completed in 2041ms 34 silly currentTree pilets@1.0.0 34 silly currentTree ├── accepts@1.3.7 34 silly currentTree ├── array-flatten@1.1.1 34 silly currentTree ├── body-parser@1.19.0 34 silly currentTree ├── bytes@3.1.0 34 silly currentTree ├── content-disposition@0.5.3 34 silly currentTree ├── content-type@1.0.4 34 silly currentTree ├── cookie-signature@1.0.6 34 silly currentTree ├── cookie@0.4.0 34 silly currentTree ├── cors@2.8.5 34 silly currentTree ├── debug@2.6.9 34 silly currentTree ├── depd@1.1.2 34 silly currentTree ├── destroy@1.0.4 34 silly currentTree ├── ee-first@1.1.1 34 silly currentTree ├── encodeurl@1.0.2 34 silly currentTree ├── escape-html@1.0.3 34 silly currentTree ├── etag@1.8.1 34 silly currentTree ├── express@4.17.1 34 silly currentTree ├── finalhandler@1.1.2 34 silly currentTree ├── forwarded@0.1.2 34 silly currentTree ├── fresh@0.5.2 34 silly currentTree ├── http-errors@1.7.2 34 silly currentTree ├── iconv-lite@0.4.24 34 silly currentTree ├── inherits@2.0.3 34 silly currentTree ├── ipaddr.js@1.9.0 34 silly currentTree ├── lodash.debounce@4.0.8 34 silly currentTree ├── media-typer@0.3.0 34 silly currentTree ├── merge-descriptors@1.0.1 34 silly currentTree ├── methods@1.1.2 34 silly currentTree ├── mime-db@1.40.0 34 silly currentTree ├── mime-types@2.1.24 34 silly currentTree ├── mime@1.6.0 34 silly currentTree ├── ms@2.0.0 34 silly currentTree ├── negotiator@0.6.2 34 silly currentTree ├── object-assign@4.1.1 34 silly currentTree ├── on-finished@2.3.0 34 silly currentTree ├── parseurl@1.3.3 34 silly currentTree ├── path-to-regexp@0.1.7 34 silly currentTree ├── proxy-addr@2.0.5 34 silly currentTree ├── qs@6.7.0 34 silly currentTree ├── range-parser@1.2.1 34 silly currentTree ├── raw-body@2.4.0 34 silly currentTree ├── safe-buffer@5.1.2 34 silly currentTree ├── safer-buffer@2.1.2 34 silly currentTree ├─┬ send@0.17.1 34 silly currentTree │ └── ms@2.1.1 34 silly currentTree ├── serve-static@1.14.1 34 silly currentTree ├── setprototypeof@1.1.1 34 silly currentTree ├── statuses@1.5.0 34 silly currentTree ├── toidentifier@1.0.0 34 silly currentTree ├── type-is@1.6.18 34 silly currentTree ├── unpipe@1.0.0 34 silly currentTree ├── utils-merge@1.0.1 34 silly currentTree └── vary@1.1.2 35 silly idealTree pilets@1.0.0 35 silly idealTree ├── accepts@1.3.7 35 silly idealTree ├── array-flatten@1.1.1 35 silly idealTree ├── bindings@1.5.0 35 silly idealTree ├── body-parser@1.19.0 35 silly idealTree ├── bytes@3.1.0 35 silly idealTree ├── content-disposition@0.5.3 35 silly idealTree ├── content-type@1.0.4 35 silly idealTree ├── cookie-signature@1.0.6 35 silly idealTree ├── cookie@0.4.0 35 silly idealTree ├── cors@2.8.5 35 silly idealTree ├── debug@2.6.9 35 silly idealTree ├── depd@1.1.2 35 silly idealTree ├── destroy@1.0.4 35 silly idealTree ├── ee-first@1.1.1 35 silly idealTree ├── encodeurl@1.0.2 35 silly idealTree ├── epoll@2.0.9 35 silly idealTree ├── escape-html@1.0.3 35 silly idealTree ├── etag@1.8.1 35 silly idealTree ├── express@4.17.1 35 silly idealTree ├── file-uri-to-path@1.0.0 35 silly idealTree ├── finalhandler@1.1.2 35 silly idealTree ├── forwarded@0.1.2 35 silly idealTree ├── fresh@0.5.2 35 silly idealTree ├── http-errors@1.7.2 35 silly idealTree ├── iconv-lite@0.4.24 35 silly idealTree ├── inherits@2.0.3 35 silly idealTree ├── ipaddr.js@1.9.0 35 silly idealTree ├── lodash.debounce@4.0.8 35 silly idealTree ├── media-typer@0.3.0 35 silly idealTree ├── merge-descriptors@1.0.1 35 silly idealTree ├── methods@1.1.2 35 silly idealTree ├── mime-db@1.40.0 35 silly idealTree ├── mime-types@2.1.24 35 silly idealTree ├── mime@1.6.0 35 silly idealTree ├── ms@2.0.0 35 silly idealTree ├── nan@2.14.0 35 silly idealTree ├── negotiator@0.6.2 35 silly idealTree ├── object-assign@4.1.1 35 silly idealTree ├── on-finished@2.3.0 35 silly idealTree ├── onoff@4.1.2 35 silly idealTree ├── parseurl@1.3.3 35 silly idealTree ├── path-to-regexp@0.1.7 35 silly idealTree ├── proxy-addr@2.0.5 35 silly idealTree ├── qs@6.7.0 35 silly idealTree ├── range-parser@1.2.1 35 silly idealTree ├── raw-body@2.4.0 35 silly idealTree ├── safe-buffer@5.1.2 35 silly idealTree ├── safer-buffer@2.1.2 35 silly idealTree ├─┬ send@0.17.1 35 silly idealTree │ └── ms@2.1.1 35 silly idealTree ├── serve-static@1.14.1 35 silly idealTree ├── setprototypeof@1.1.1 35 silly idealTree ├── statuses@1.5.0 35 silly idealTree ├── toidentifier@1.0.0 35 silly idealTree ├── type-is@1.6.18 35 silly idealTree ├── unpipe@1.0.0 35 silly idealTree ├── utils-merge@1.0.1 35 silly idealTree └── vary@1.1.2 36 silly install generateActionsToTake 37 timing stage:generateActionsToTake Completed in 57ms 38 silly diffTrees action count 5 39 silly diffTrees add file-uri-to-path@1.0.0 40 silly diffTrees add bindings@1.5.0 41 silly diffTrees add nan@2.14.0 42 silly diffTrees add epoll@2.0.9 43 silly diffTrees add onoff@4.1.2 44 silly decomposeActions action count 40 45 silly decomposeActions fetch file-uri-to-path@1.0.0 46 silly decomposeActions extract file-uri-to-path@1.0.0 47 silly decomposeActions preinstall file-uri-to-path@1.0.0 48 silly decomposeActions build file-uri-to-path@1.0.0 49 silly decomposeActions install file-uri-to-path@1.0.0 50 silly decomposeActions postinstall file-uri-to-path@1.0.0 51 silly decomposeActions finalize file-uri-to-path@1.0.0 52 silly decomposeActions refresh-package-json file-uri-to-path@1.0.0 53 silly decomposeActions fetch bindings@1.5.0 54 silly decomposeActions extract bindings@1.5.0 55 silly decomposeActions preinstall bindings@1.5.0 56 silly decomposeActions build bindings@1.5.0 57 silly decomposeActions install bindings@1.5.0 58 silly decomposeActions postinstall bindings@1.5.0 59 silly decomposeActions finalize bindings@1.5.0 60 silly decomposeActions refresh-package-json bindings@1.5.0 61 silly decomposeActions fetch nan@2.14.0 62 silly decomposeActions extract nan@2.14.0 63 silly decomposeActions preinstall nan@2.14.0 64 silly decomposeActions build nan@2.14.0 65 silly decomposeActions install nan@2.14.0 66 silly decomposeActions postinstall nan@2.14.0 67 silly decomposeActions finalize nan@2.14.0 68 silly decomposeActions refresh-package-json nan@2.14.0 69 silly decomposeActions fetch epoll@2.0.9 70 silly decomposeActions extract epoll@2.0.9 71 silly decomposeActions preinstall epoll@2.0.9 72 silly decomposeActions build epoll@2.0.9 73 silly decomposeActions install epoll@2.0.9 74 silly decomposeActions postinstall epoll@2.0.9 75 silly decomposeActions finalize epoll@2.0.9 76 silly decomposeActions refresh-package-json epoll@2.0.9 77 silly decomposeActions fetch onoff@4.1.2 78 silly decomposeActions extract onoff@4.1.2 79 silly decomposeActions preinstall onoff@4.1.2 80 silly decomposeActions build onoff@4.1.2 81 silly decomposeActions install onoff@4.1.2 82 silly decomposeActions postinstall onoff@4.1.2 83 silly decomposeActions finalize onoff@4.1.2 84 silly decomposeActions refresh-package-json onoff@4.1.2 85 silly install executeActions 86 silly doSerial global-install 40 87 verbose correctMkdir /home/ubuntu/.npm/_locks correctMkdir not in flight; initializing 88 verbose lock using /home/ubuntu/.npm/_locks/staging-8d7e60444644fc94.lock for /home/ubuntu/pilets/node_modules/.staging 89 silly doParallel extract 5 90 silly extract file-uri-to-path@1.0.0 91 silly extract bindings@1.5.0 92 silly extract nan@2.14.0 93 silly extract epoll@2.0.9 94 silly extract onoff@4.1.2 95 silly tarball trying file-uri-to-path@1.0.0 by hash: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== 96 silly tarball trying bindings@^1.5.0 by hash: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== 97 silly tarball trying nan@^2.13.0 by hash: sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== 98 silly tarball trying epoll@^2.0.9 by hash: sha512-9q60N1vPy2NXIH3i9S2FPRapc40IeTGgFQ47eCbiKw/ghEZszTVB/k3z3Rul7O/fj8o3/eKqd+BS5toS902XMQ== 99 silly tarball trying onoff@latest by hash: sha512-e54ii0MhFqu3f0gJYOiWD4Mgj89GywJGjUDrV+v3NNKrc8SufLoYldsvL+SFLxORYtNor2M4U4HAsl82OIEctQ== 100 silly extract bindings@^1.5.0 extracted to /home/ubuntu/pilets/node_modules/.staging/bindings-b08fb4de (256ms) 101 silly extract file-uri-to-path@1.0.0 extracted to /home/ubuntu/pilets/node_modules/.staging/file-uri-to-path-3ad539ef (283ms) 102 silly extract epoll@^2.0.9 extracted to /home/ubuntu/pilets/node_modules/.staging/epoll-364b44b9 (353ms) 103 silly extract onoff@latest extracted to /home/ubuntu/pilets/node_modules/.staging/onoff-9027811e (380ms) 104 silly extract nan@^2.13.0 extracted to /home/ubuntu/pilets/node_modules/.staging/nan-56be477c (400ms) 105 timing action:extract Completed in 421ms 106 silly doReverseSerial unbuild 40 107 silly doSerial remove 40 108 silly doSerial move 40 109 silly doSerial finalize 40 110 silly finalize /home/ubuntu/pilets/node_modules/file-uri-to-path 111 silly finalize /home/ubuntu/pilets/node_modules/bindings 112 silly finalize /home/ubuntu/pilets/node_modules/nan 113 silly finalize /home/ubuntu/pilets/node_modules/epoll 114 silly finalize /home/ubuntu/pilets/node_modules/onoff 115 timing action:finalize Completed in 38ms 116 silly doParallel refresh-package-json 5 117 silly refresh-package-json /home/ubuntu/pilets/node_modules/file-uri-to-path 118 silly refresh-package-json /home/ubuntu/pilets/node_modules/bindings 119 silly refresh-package-json /home/ubuntu/pilets/node_modules/nan 120 silly refresh-package-json /home/ubuntu/pilets/node_modules/epoll 121 silly refresh-package-json /home/ubuntu/pilets/node_modules/onoff 122 timing audit submit Completed in 584ms 123 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 585ms 124 timing audit body Completed in 4ms 125 timing action:refresh-package-json Completed in 97ms 126 silly doParallel preinstall 5 127 silly preinstall file-uri-to-path@1.0.0 128 info lifecycle file-uri-to-path@1.0.0~preinstall: file-uri-to-path@1.0.0 129 silly preinstall bindings@1.5.0 130 info lifecycle bindings@1.5.0~preinstall: bindings@1.5.0 131 silly preinstall nan@2.14.0 132 info lifecycle nan@2.14.0~preinstall: nan@2.14.0 133 silly preinstall epoll@2.0.9 134 info lifecycle epoll@2.0.9~preinstall: epoll@2.0.9 135 silly preinstall onoff@4.1.2 136 info lifecycle onoff@4.1.2~preinstall: onoff@4.1.2 137 timing action:preinstall Completed in 12ms 138 silly doSerial build 40 139 silly build file-uri-to-path@1.0.0 140 info linkStuff file-uri-to-path@1.0.0 141 silly linkStuff file-uri-to-path@1.0.0 has /home/ubuntu/pilets/node_modules as its parent node_modules 142 silly build bindings@1.5.0 143 info linkStuff bindings@1.5.0 144 silly linkStuff bindings@1.5.0 has /home/ubuntu/pilets/node_modules as its parent node_modules 145 silly build nan@2.14.0 146 info linkStuff nan@2.14.0 147 silly linkStuff nan@2.14.0 has /home/ubuntu/pilets/node_modules as its parent node_modules 148 silly build epoll@2.0.9 149 info linkStuff epoll@2.0.9 150 silly linkStuff epoll@2.0.9 has /home/ubuntu/pilets/node_modules as its parent node_modules 151 silly build onoff@4.1.2 152 info linkStuff onoff@4.1.2 153 silly linkStuff onoff@4.1.2 has /home/ubuntu/pilets/node_modules as its parent node_modules 154 timing action:build Completed in 9ms 155 silly doSerial global-link 40 156 silly doParallel update-linked 0 157 silly doSerial install 40 158 silly install file-uri-to-path@1.0.0 159 info lifecycle file-uri-to-path@1.0.0~install: file-uri-to-path@1.0.0 160 silly install bindings@1.5.0 161 info lifecycle bindings@1.5.0~install: bindings@1.5.0 162 silly install nan@2.14.0 163 info lifecycle nan@2.14.0~install: nan@2.14.0 164 silly install epoll@2.0.9 165 info lifecycle epoll@2.0.9~install: epoll@2.0.9 166 verbose lifecycle epoll@2.0.9~install: unsafe-perm in lifecycle true 167 verbose lifecycle epoll@2.0.9~install: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/pilets/node_modules/epoll/node_modules/.bin:/home/ubuntu/pilets/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 168 verbose lifecycle epoll@2.0.9~install: CWD: /home/ubuntu/pilets/node_modules/epoll 169 silly lifecycle epoll@2.0.9~install: Args: [ '-c', 'node-gyp rebuild' ] 170 silly lifecycle epoll@2.0.9~install: Returned: code: 1 signal: null 171 info lifecycle epoll@2.0.9~install: Failed to exec install script 172 timing action:install Completed in 2630ms 173 verbose unlock done using /home/ubuntu/.npm/_locks/staging-8d7e60444644fc94.lock for /home/ubuntu/pilets/node_modules/.staging 174 timing stage:rollbackFailedOptional Completed in 124ms 175 timing stage:runTopLevelLifecycles Completed in 6770ms 176 silly saveTree pilets@1.0.0 176 silly saveTree ├─┬ body-parser@1.19.0 176 silly saveTree │ ├── bytes@3.1.0 176 silly saveTree │ ├── content-type@1.0.4 176 silly saveTree │ ├─┬ debug@2.6.9 176 silly saveTree │ │ └── ms@2.0.0 176 silly saveTree │ ├── depd@1.1.2 176 silly saveTree │ ├─┬ http-errors@1.7.2 176 silly saveTree │ │ ├── inherits@2.0.3 176 silly saveTree │ │ ├── setprototypeof@1.1.1 176 silly saveTree │ │ ├── statuses@1.5.0 176 silly saveTree │ │ └── toidentifier@1.0.0 176 silly saveTree │ ├─┬ iconv-lite@0.4.24 176 silly saveTree │ │ └── safer-buffer@2.1.2 176 silly saveTree │ ├─┬ on-finished@2.3.0 176 silly saveTree │ │ └── ee-first@1.1.1 176 silly saveTree │ ├── qs@6.7.0 176 silly saveTree │ ├─┬ raw-body@2.4.0 176 silly saveTree │ │ └── unpipe@1.0.0 176 silly saveTree │ └─┬ type-is@1.6.18 176 silly saveTree │ ├── media-typer@0.3.0 176 silly saveTree │ └─┬ mime-types@2.1.24 176 silly saveTree │ └── mime-db@1.40.0 176 silly saveTree ├─┬ cors@2.8.5 176 silly saveTree │ ├── object-assign@4.1.1 176 silly saveTree │ └── vary@1.1.2 176 silly saveTree ├─┬ express@4.17.1 176 silly saveTree │ ├─┬ accepts@1.3.7 176 silly saveTree │ │ └── negotiator@0.6.2 176 silly saveTree │ ├── array-flatten@1.1.1 176 silly saveTree │ ├─┬ content-disposition@0.5.3 176 silly saveTree │ │ └── safe-buffer@5.1.2 176 silly saveTree │ ├── cookie-signature@1.0.6 176 silly saveTree │ ├── cookie@0.4.0 176 silly saveTree │ ├── encodeurl@1.0.2 176 silly saveTree │ ├── escape-html@1.0.3 176 silly saveTree │ ├── etag@1.8.1 176 silly saveTree │ ├─┬ finalhandler@1.1.2 176 silly saveTree │ │ └── parseurl@1.3.3 176 silly saveTree │ ├── fresh@0.5.2 176 silly saveTree │ ├── merge-descriptors@1.0.1 176 silly saveTree │ ├── methods@1.1.2 176 silly saveTree │ ├── parseurl@1.3.3 176 silly saveTree │ ├── path-to-regexp@0.1.7 176 silly saveTree │ ├─┬ proxy-addr@2.0.5 176 silly saveTree │ │ ├── forwarded@0.1.2 176 silly saveTree │ │ └── ipaddr.js@1.9.0 176 silly saveTree │ ├── range-parser@1.2.1 176 silly saveTree │ ├── safe-buffer@5.1.2 176 silly saveTree │ ├─┬ send@0.17.1 176 silly saveTree │ │ ├── destroy@1.0.4 176 silly saveTree │ │ ├── mime@1.6.0 176 silly saveTree │ │ └── ms@2.1.1 176 silly saveTree │ ├── serve-static@1.14.1 176 silly saveTree │ └── utils-merge@1.0.1 176 silly saveTree └─┬ onoff@4.1.2 176 silly saveTree ├─┬ epoll@2.0.9 176 silly saveTree │ ├─┬ bindings@1.5.0 176 silly saveTree │ │ └── file-uri-to-path@1.0.0 176 silly saveTree │ └── nan@2.14.0 176 silly saveTree └── lodash.debounce@4.0.8 177 warn pilets@1.0.0 No description 178 warn pilets@1.0.0 No repository field. 179 verbose stack Error: epoll@2.0.9 install: node-gyp rebuild 179 verbose stack Exit status 1 179 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16) 179 verbose stack at EventEmitter.emit (events.js:198:13) 179 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 179 verbose stack at ChildProcess.emit (events.js:198:13) 179 verbose stack at maybeClose (internal/child_process.js:982:16) 179 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 180 verbose pkgid epoll@2.0.9 181 verbose cwd /home/ubuntu/pilets 182 verbose Linux 4.15.0-1040-raspi2 183 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "onoff" 184 verbose node v10.16.0 185 verbose npm v6.9.0 186 error code ELIFECYCLE 187 error errno 1 188 error epoll@2.0.9 install: node-gyp rebuild 188 error Exit status 1 189 error Failed at the epoll@2.0.9 install script. 189 error This is probably not a problem with npm. There is likely additional logging output above. 190 verbose exit [ 1, true ]

fivdi commented 5 years ago

That looks like the contents of the npm log file. Unfortunately this file doesn't include the information printed on the screen when npm install onoff in called. Can you post the information printed to the screen when npm install onoff is called please.

engineertdog commented 5 years ago

ubuntu@ubuntu:~/pilets$ npm install onoff

epoll@2.0.9 install /home/ubuntu/pilets/node_modules/epoll node-gyp rebuild

gyp ERR! build error gyp ERR! stack Error: not found: make gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/w hich/which.js:13:12) gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:6 8:19) gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:8 0:29) gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:1 6 gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5 gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:153:21) gyp ERR! System Linux 4.15.0-1040-raspi2 gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gy p/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/ubuntu/pilets/node_modules/epoll gyp ERR! node -v v10.16.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN pilets@1.0.0 No description npm WARN pilets@1.0.0 No repository field.

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

npm ERR! A complete log of this run can be found in: npm ERR! /home/ubuntu/.npm/_logs/2019-07-05T15_58_46_668Z-debug.log

fivdi commented 5 years ago

It looks like the tools that are needed for building C/C++ code have not been installed yet. Run the following command and then try to install onoff again:

sudo apt-get install build-essential
engineertdog commented 5 years ago

I'm sorry, I had just noticed that I somehow came to this repo instead of the official onoff repo itself, even though I had used the npm page. That did the trick, but I'm curious as to why this was not previously installed? I could see that being an issue for a fresh Ubuntu 18.04 Server, where it's a little more lightweight for the PI. However, even my full Ubuntu 18.04 AWS EC2 instance could not install onoff either, and I had to install build-essential as well.

fivdi commented 5 years ago

I'm sorry, I had just noticed that I somehow came to this repo instead of the official onoff repo itself, even though I had used the npm page.

No problem.

That did the trick

That's good news.

but I'm curious as to why this was not previously installed? I could see that being an issue for a fresh Ubuntu 18.04 Server, where it's a little more lightweight for the PI. However, even my full Ubuntu 18.04 AWS EC2 instance could not install onoff either, and I had to install build-essential as well.

The people who create the Ubuntu distributions probably decided that the majority of their users don't need build-essentials so they didn't include it by default. This sounds reasonable to me. Typically build-essentials is only needed by users who build software from source. I guess that the majority of Ubuntu users don't do this.

engineertdog commented 5 years ago

Would it be recommended to include it in the readme / installation somewhere? I don't recall if I had to do this the last time I installed onoff. But, that was also on raspbian and not on Ubuntu.

fivdi commented 5 years ago

Would it be recommended to include it in the readme / installation somewhere? I don't recall if I had to do this the last time I installed onoff. But, that was also on raspbian and not on Ubuntu.

I'd prefer not to add information to the readme that the majority of users won't need. Raspbian is the operating system used by most people on the Raspberry Pi. Raspbian comes with build-essentials installed by default. BeagleBobe.org provides Debian distributions for the BeagleBone. This also comes with build essentials installed by default. The manufacturers of SBCs typically have developers in focus and will include build-essentials with their distributions by default.

If the error occurred on Raspbian I would add it to the readme.