Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes when trying to compile sqlite3 #1640

Closed
shankargopal opened this issue Jan 4, 2019 · 1 comment
Closed

Crashes when trying to compile sqlite3 #1640

shankargopal opened this issue Jan 4, 2019 · 1 comment

Comments

@shankargopal
Copy link

shankargopal commented Jan 4, 2019

  • Node Version: 8.11.1; npm 5.8.0
  • Platform: Linux debian 4.15.0-2-686-pae Make 0.6.x work #1 SMP Debian 4.15.11-1 (2018-03-20) i686 GNU/Linux
  • Compiler: gcc version 8.2.0 (Debian 8.2.0-13)
  • Module: Joplin
Verbose output (from npm or node-gyp):

I am trying to build Joplin using npm install. With the same config, if I run npm install sqlite3 or npm install electron, it appears to work fine. However, when I run Joplin on the Joplin electron app, I get:

> [email protected] postinstall /home/user/Software/joplin-desktop/ElectronClient/app
> node compile-jsx.js && node compile-package-info.js && node ../../Tools/copycss.js --copy-fonts && install-app-deps

  • please use as subcommand: electron-builder install-app-deps
  • electron-builder version=20.14.7
  • loaded configuration file=package.json ("build" field)
  • rebuilding native production dependencies platform=linux arch=ia32
Error: /usr/bin/node exited with code 1
Error output:
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.4/electron-v1.8-linux-ia32.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (electron-v1.8 ABI, glibc) (falling back to source compile with node-gyp) 
gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack TypeError: Cannot read property 'substring' of undefined
gyp ERR! stack     at Unpack.isValid [as filter] (/usr/share/node-gyp/lib/install.js:156:30)
gyp ERR! stack     at Unpack.[consumeHeader] (/usr/lib/nodejs/tar/lib/parse.js:134:48)
gyp ERR! stack     at Unpack.[consumeChunkSub] (/usr/lib/nodejs/tar/lib/parse.js:385:30)
gyp ERR! stack     at Unpack.[consumeChunk] (/usr/lib/nodejs/tar/lib/parse.js:362:30)
gyp ERR! stack     at Unpack.write (/usr/lib/nodejs/tar/lib/parse.js:309:25)
gyp ERR! stack     at Gunzip.ondata (_stream_readable.js:639:20)
gyp ERR! stack     at emitOne (events.js:116:13)
gyp ERR! stack     at Gunzip.emit (events.js:211:7)
gyp ERR! stack     at addChunk (_stream_readable.js:263:12)
gyp ERR! stack     at readableAddChunk (_stream_readable.js:250:11)
gyp ERR! System Linux 4.15.0-2-686-pae
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "configure" "--fallback-to-build" "--module=/home/user/Software/joplin-desktop/ElectronClient/app/node_modules/sqlite3/lib/binding/electron-v1.8-linux-ia32/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/user/Software/joplin-desktop/ElectronClient/app/node_modules/sqlite3/lib/binding/electron-v1.8-linux-ia32" "--napi_version=1" "--node_abi_napi=napi"
gyp ERR! cwd /home/user/Software/joplin-desktop/ElectronClient/app/node_modules/sqlite3
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/bin/node-gyp configure --fallback-to-build --module=/home/user/Software/joplin-desktop/ElectronClient/app/node_modules/sqlite3/lib/binding/electron-v1.8-linux-ia32/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/user/Software/joplin-desktop/ElectronClient/app/node_modules/sqlite3/lib/binding/electron-v1.8-linux-ia32 --napi_version=1 --node_abi_napi=napi' (7)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/user/Software/joplin-desktop/ElectronClient/app/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Linux 4.15.0-2-686-pae
node-pre-gyp ERR! command "/usr/bin/node" "/home/user/Software/joplin-desktop/ElectronClient/app/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/user/Software/joplin-desktop/ElectronClient/app/node_modules/sqlite3
node-pre-gyp ERR! node -v v8.11.1
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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-01-04T16_29_12_227Z-debug.log

    at ChildProcess.childProcess.once.code (/home/user/Software/joplin-desktop/ElectronClient/app/node_modules/builder-util/src/util.ts:252:14)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:567:12)
From previous event:
    at rebuild (/home/user/Software/joplin-desktop/ElectronClient/app/node_modules/electron-builder-lib/out/util/yarn.js:234:18)
    at /home/user/Software/joplin-desktop/ElectronClient/app/node_modules/electron-builder-lib/src/util/yarn.ts:20:11
From previous event:
    at installOrRebuild (/home/user/Software/joplin-desktop/ElectronClient/app/node_modules/electron-builder-lib/out/util/yarn.js:68:17)
    at /home/user/Software/joplin-desktop/ElectronClient/app/node_modules/electron-builder/src/cli/install-app-deps.ts:57:20
    at Generator.next (<anonymous>)
    at runCallback (timers.js:794:20)
    at tryOnImmediate (timers.js:752:5)
    at processImmediate [as _immediateCallback] (timers.js:729:5)
From previous event:
    at installAppDeps (/home/user/Software/joplin-desktop/ElectronClient/app/node_modules/electron-builder/out/cli/install-app-deps.js:174:17)
    at main (/home/user/Software/joplin-desktop/ElectronClient/app/node_modules/electron-builder/src/cli/install-app-deps.ts:66:2)
    at Object.<anonymous> (/home/user/Software/joplin-desktop/ElectronClient/app/node_modules/electron-builder/out/cli/install-app-deps.js:187:3)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node compile-jsx.js && node compile-package-info.js && node ../../Tools/copycss.js --copy-fonts && install-app-deps`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall 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-01-04T16_29_12_422Z-debug.log

The Joplin developer has said that he does not think this is a bug in Joplin, and the error message also says "This is a bug in node-gyp."

What can I do to fix this? Many thanks for all your hard work!

@shankargopal shankargopal reopened this Jan 4, 2019
@shankargopal shankargopal changed the title Crashes when trying to compile sqlite3 within a Joplin install Crashes when trying to compile sqlite3 Jan 4, 2019
@shankargopal
Copy link
Author

I upgraded the installation of npm and the issue resolved itself. Thank you again for all the work you do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant