Closed ellogwen closed 6 years ago
build fails on macOS for node > 10.1
Here's the build output with node 10.3.0
Error: /Users/ashishkumarpandey/.nvm/versions/node/v10.3.0/bin/node exited with code 1
Output:
> sqlite3@3.1.13 install /Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/app/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3150000/sqlite3.c
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3150000/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o
LIBTOOL-STATIC Release/sqlite3.a
LIBTOOL-STATIC Release/sqlite3.a
CXX(target) Release/obj.target/node_sqlite3/src/database.o
CXX(target) Release/obj.target/node_sqlite3/src/database.o
CXX(target) Release/obj.target/node_sqlite3/src/node_sqlite3.o
Failed to execute '/Users/ashishkumarpandey/.nvm/versions/node/v10.3.0/bin/node /Users/ashishkumarpandey/.nvm/versions/node/v10.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/app/node_modules/sqlite3/lib/binding/electron-v2.0-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/app/node_modules/sqlite3/lib/binding/electron-v2.0-darwin-x64' (1)
CXX(target) Release/obj.target/node_sqlite3/src/statement.o
SOLINK_MODULE(target) Release/node_sqlite3.node
COPY /Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/app/node_modules/sqlite3/lib/binding/electron-v2.0-darwin-x64/node_sqlite3.node
TOUCH Release/obj.target/action_after_build.stamp
Error output:
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/electron-v2.0-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.13 and electron@2.0.2 (electron-v2.0 ABI) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/electron-v2.0-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.13 and electron@2.0.2 (electron-v2.0 ABI) (falling back to source compile with node-gyp)
../src/database.cc:144:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
../src/database.cc:230:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
../src/database.cc:144:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
../src/database.cc:525:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
../src/database.cc:230:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
../src/database.cc:625:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
../src/database.cc:525:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
../src/database.cc:625:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
4 warnings generated.
4 warnings generated.
sed: ./Release/.deps/Release/obj.target/node_sqlite3/src/database.o.d.raw: No such file or directory
make: *** [Release/obj.target/node_sqlite3/src/database.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/ashishkumarpandey/.nvm/versions/node/v10.3.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/Users/ashishkumarpandey/.nvm/versions/node/v10.3.0/bin/node" "/Users/ashishkumarpandey/.nvm/versions/node/v10.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/app/node_modules/sqlite3/lib/binding/electron-v2.0-darwin-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/app/node_modules/sqlite3/lib/binding/electron-v2.0-darwin-x64"
gyp ERR! cwd /Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/app/node_modules/sqlite3
gyp ERR! node -v v10.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/ashishkumarpandey/.nvm/versions/node/v10.3.0/bin/node /Users/ashishkumarpandey/.nvm/versions/node/v10.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/app/node_modules/sqlite3/lib/binding/electron-v2.0-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/app/node_modules/sqlite3/lib/binding/electron-v2.0-darwin-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/app/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp ERR! System Darwin 17.5.0
node-pre-gyp ERR! command "/Users/ashishkumarpandey/.nvm/versions/node/v10.3.0/bin/node" "/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/app/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/app/node_modules/sqlite3
node-pre-gyp ERR! node -v v10.3.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.38
node-pre-gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@3.1.13 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@3.1.13 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! /Users/ashishkumarpandey/.npm/_logs/2018-05-30T07_18_35_584Z-debug.log
../src/statement.cc:118:9: warning: unused variable 'status' [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
../src/statement.cc:322:5: warning: unused variable 'status' [-Wunused-variable]
STATEMENT_BEGIN(Bind);
^
../src/macros.h:125:9: note: expanded from macro 'STATEMENT_BEGIN'
int status = uv_queue_work(uv_default_loop(), \
^
../src/statement.cc:370:5: warning: unused variable 'status' [-Wunused-variable]
STATEMENT_BEGIN(Get);
^
../src/macros.h:125:9: note: expanded from macro 'STATEMENT_BEGIN'
int status = uv_queue_work(uv_default_loop(), \
^
../src/statement.cc:438:5: warning: unused variable 'status' [-Wunused-variable]
STATEMENT_BEGIN(Run);
^
../src/macros.h:125:9: note: expanded from macro 'STATEMENT_BEGIN'
int status = uv_queue_work(uv_default_loop(), \
^
../src/statement.cc:504:5: warning: unused variable 'status' [-Wunused-variable]
STATEMENT_BEGIN(All);
^
../src/macros.h:125:9: note: expanded from macro 'STATEMENT_BEGIN'
int status = uv_queue_work(uv_default_loop(), \
^
../src/statement.cc:601:5: warning: unused variable 'status' [-Wunused-variable]
STATEMENT_BEGIN(Each);
^
../src/macros.h:125:9: note: expanded from macro 'STATEMENT_BEGIN'
int status = uv_queue_work(uv_default_loop(), \
^
../src/statement.cc:724:5: warning: unused variable 'status' [-Wunused-variable]
STATEMENT_BEGIN(Reset);
^
../src/macros.h:125:9: note: expanded from macro 'STATEMENT_BEGIN'
int status = uv_queue_work(uv_default_loop(), \
^
7 warnings generated.
at ChildProcess.childProcess.once.code (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/builder-util/src/util.ts:241:14)
at Object.onceWrapper (events.js:273:13)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Socket.stream.socket.on (internal/child_process.js:380:11)
at Socket.emit (events.js:182:13)
at Pipe._handle.close [as _onclose] (net.js:596:12)
From previous event:
at spawn (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/builder-util/src/util.ts:200:3)
at /Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder-lib/src/util/yarn.ts:171:5
From previous event:
at rebuild (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder-lib/out/util/yarn.js:93:22)
at /Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder-lib/src/util/yarn.ts:20:11
at Generator.next (<anonymous>)
at runCallback (timers.js:696:18)
at tryOnImmediate (timers.js:667:5)
at processImmediate (timers.js:649:5)
From previous event:
at installOrRebuild (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder-lib/out/util/yarn.js:31:21)
at /Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder-lib/src/packager.ts:442:7
at Generator.next (<anonymous>)
From previous event:
at Packager.installAppDependencies (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder-lib/out/packager.js:496:11)
at /Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder-lib/src/packager.ts:356:20
at Generator.next (<anonymous>)
From previous event:
at Packager.doBuild (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder-lib/out/packager.js:432:11)
at /Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder-lib/src/packager.ts:308:52
at Generator.next (<anonymous>)
at /Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/graceful-fs/graceful-fs.js:99:16
at /Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:169:20)
From previous event:
at Packager._build (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder-lib/out/packager.js:376:11)
at /Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder-lib/src/packager.ts:270:23
at Generator.next (<anonymous>)
at runCallback (timers.js:696:18)
at tryOnImmediate (timers.js:667:5)
at processImmediate (timers.js:649:5)
From previous event:
at Packager.build (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder-lib/out/packager.js:332:11)
at /Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder/src/builder.ts:310:40
at Generator.next (<anonymous>)
From previous event:
at _build (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder/out/builder.js:61:21)
at build (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder/src/builder.ts:280:10)
at then (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder/src/cli/cli.ts:48:33)
at runCallback (timers.js:696:18)
at tryOnImmediate (timers.js:667:5)
at processImmediate (timers.js:649:5)
From previous event:
at Object.args [as handler] (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder/src/cli/cli.ts:48:33)
at Object.runCommand (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/yargs/lib/command.js:235:44)
at Object.parseArgs [as _parseArgs] (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/yargs/yargs.js:1042:24)
at Object.get [as argv] (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/yargs/yargs.js:957:21)
at Object.<anonymous> (/Users/ashishkumarpandey/work/brandmusiq/soniqspaces-desktop/node_modules/electron-builder/src/cli/cli.ts:42:15)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)
at startup (internal/bootstrap/node.js:238:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron-react-boilerplate@0.13.1 package: `npm run build && build --publish never`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron-react-boilerplate@0.13.1 package 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! /Users/ashishkumarpandey/.npm/_logs/2018-05-30T07_18_37_529Z-debug.log
@ellogwen please edit the issue title to - install / build fails for node > 10.1
@ellogwen Thanks, that was quick!
@ashishpandey001 notifications are a nice feature ^^
Same here, I'm also getting this. No way to compile, I'm stuck!!!
node -v
v10.2.1
@darkguy2008 Simply install nvm and use node 10.1.0, your builds will succeed then.
@ashishpandey001 NVM is not the solution. I actually had uninstalled it because it throws warnings as Node 10 comes with an old NPM version and when you try to update it, it doesn't work, NVM for Windows hasn't been updated in ages and the workaround in their issues feed is not ideal either. The correct solution would be to fix this instead. I had to downgrade to 8.11 for it to work but then I have to reinstall Node versions every time I switch to another project... what a nuisance.
@darkguy2008 Well, until this is fixed, nvm could've helped. But, that's upto you.
@darkguy2008 It's possible to run multiple node versions on a per project basis, without nvm thanks to the node npm package.
To just run basic things on the command line, you'll need to use npx:
$ npx node@10.1.0 ./index.js
But, since it's an npm module, you can npm i --save-dev node@10.1.0
and then use npm scripts to wrap it all up:
{
"name": "node-version-test",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"start": "node server.js",
},
"author": "",
"license": "WTFPL",
"devDependencies": {
"node": "^10.1.0"
}
}
[ccase:dante] ~/d/t/node-version-test > # We can see that this runs node v10.1.0:
[ccase:dante] ~/d/t/node-version-test > npm start
> pkg-version-test@1.0.0 start /Users/ccase/devel/test/node-pkg-version-test
> node server.js
Versions:
{ http_parser: '2.8.0',
node: '10.1.0',
v8: '6.6.346.27-node.6',
uv: '1.20.2',
zlib: '1.2.11',
ares: '1.14.0',
modules: '64',
nghttp2: '1.29.0',
napi: '3',
openssl: '1.1.0h',
icu: '61.1',
unicode: '10.0',
cldr: '33.0',
tz: '2018c' }
[ccase:dante] ~/d/t/node-version-test > # But, my local node is older:
[ccase:dante] ~/d/t/node-version-test > node server.js
Versions:
{ http_parser: '2.8.0',
node: '9.10.1',
v8: '6.2.414.46-node.23',
uv: '1.19.2',
zlib: '1.2.11',
ares: '1.13.0',
modules: '59',
nghttp2: '1.29.0',
napi: '2',
openssl: '1.0.2o',
icu: '61.1',
unicode: '10.0',
cldr: '33.0',
tz: '2018c' }
[ccase:dante] ~/d/t/node-version-test >
IMHO this trick is a more elegant solution than NVM, since you can handle problems like this one on a per project basis, without too much overhead. And if everything runs inside an npm script, then other contributors don't have to have headaches about having the right version installed.
I've used these tricks before on macOS and Linux, but didn't have a windows box handy to try this on. The node
package will work on anything with > npm@2
, the system's node version doesn't actually matter, near as I can tell. (I use this on a box that still runs v0.12.0
.)
The v4.0.1 release now supports node v10: https://github.com/mapbox/node-sqlite3/blob/master/CHANGELOG.md#401
Are you sure it is fixed ?
I am still observing
../src/database.cc:689:1: fatal error: opening dependency file ./Release/.deps/Release/obj.target/node_sqlite3/src/database.o.d.raw: No such file or directory
v10.8.0 on arm32v7/debian
I can share docker container to reproduce.
Yep, also happening to me on Arch with node 10.8.0. The npm install --save-dev node@<version> && npm install
trick provided by @Morgul did not work for me. Version 10.1 of node was indeed used (so the trick does work in general), but sqlite3 still failed to install (without, however, giving me a specific error message this time).
What allowed me to install sqlite3 was npm install sqlite3 --build-from-source
.
After that, I still couldn't run my app (Beaker Browser), as I got
App threw an error during load
Error: Cannot find module '~/resources/beaker/source/node_modules/sqlite3/lib/binding/electron-v1.7-linux-x64/node_sqlite3.node'
at Module._resolveFilename (module.js:470:15)
...
But I don't think it is sqlite3 related at that point, so I'll continue this there
Same:
node v10.10.0
sqlite3@4.0.1
electron-builder@20.28.4
electron-builder install-app-deps
The main error I believe occurs here:
node-pre-gyp WARN Hit error Connection closed while downloading tarball file
rm: cannot remove './Release/.deps/Release/obj.target/sqlite3/gen/sqlite-autoconf-3240000/sqlite3.o.d.raw': No such file or directory
```
• electron-builder version=20.28.4
• loaded configuration file=package.json ("build" field)
• rebuilding native production dependencies platform=darwin arch=x64
Error: npm exited with code 1
Output:
> sqlite3@4.0.1 install /Users/username/Workspace/MyProject/node_modules/@armarti/unified-dataloader-core/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3240000/sqlite3.c
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3240000/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3240000/sqlite3.o
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3240000/sqlite3.o
LIBTOOL-STATIC Release/sqlite3.a
Failed to execute '/Users/username/.nvm/versions/node/v10.10.0/bin/node /Users/username/.nvm/versions/node/v10.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/username/Workspace/MyProject/node_modules/@armarti/unified-dataloader-core/node_modules/sqlite3/lib/binding/electron-v3.0-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/username/Workspace/MyProject/node_modules/@armarti/unified-dataloader-core/node_modules/sqlite3/lib/binding/electron-v3.0-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
CXX(target) Release/obj.target/node_sqlite3/src/database.o
CXX(target) Release/obj.target/node_sqlite3/src/node_sqlite3.o
CXX(target) Release/obj.target/node_sqlite3/src/statement.o
SOLINK_MODULE(target) Release/node_sqlite3.node
COPY /Users/username/Workspace/MyProject/node_modules/@armarti/unified-dataloader-core/node_modules/sqlite3/lib/binding/electron-v3.0-darwin-x64/node_sqlite3.node
TOUCH Release/obj.target/action_after_build.stamp
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.1/electron-v3.0-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.0.1 and electron@3.0.0-beta.12 (electron-v3.0 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Pre-built binaries not installable for sqlite3@4.0.1 and electron@3.0.0-beta.12 (electron-v3.0 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error Connection closed while downloading tarball file
rm: cannot remove './Release/.deps/Release/obj.target/sqlite3/gen/sqlite-autoconf-3240000/sqlite3.o.d.raw': No such file or directory
make: *** [Release/obj.target/sqlite3/gen/sqlite-autoconf-3240000/sqlite3.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/username/.nvm/versions/node/v10.10.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/Users/username/.nvm/versions/node/v10.10.0/bin/node" "/Users/username/.nvm/versions/node/v10.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/username/Workspace/MyProject/node_modules/@armarti/unified-dataloader-core/node_modules/sqlite3/lib/binding/electron-v3.0-darwin-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Users/username/Workspace/MyProject/node_modules/@armarti/unified-dataloader-core/node_modules/sqlite3/lib/binding/electron-v3.0-darwin-x64" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /Users/username/Workspace/MyProject/node_modules/@armarti/unified-dataloader-core/node_modules/sqlite3
gyp ERR! node -v v10.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/username/.nvm/versions/node/v10.10.0/bin/node /Users/username/.nvm/versions/node/v10.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/username/Workspace/MyProject/node_modules/@armarti/unified-dataloader-core/node_modules/sqlite3/lib/binding/electron-v3.0-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/username/Workspace/MyProject/node_modules/@armarti/unified-dataloader-core/node_modules/sqlite3/lib/binding/electron-v3.0-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.
I can also confirm the same command succeeds with node v10.1.0
and fails with node v10.2.01
.
@armarti https://github.com/mapbox/node-sqlite3/pull/1041 ^I missed adding the electron prebuilts for OSX. In the time being, you should be able to use the linux bins as a drag and drop replacement.
@ Xananax You're loading an electron 1.7 build. That is not a pure node environment, especially not v10.
'~/resources/beaker/source/node_modules/sqlite3/lib/binding/electron-v1.7-linux-x64/node_sqlite3.node'
For the record:
4.0.1 added Node v10 support
https://github.com/mapbox/node-sqlite3/blob/master/CHANGELOG.md#401
As suggested elsewhere it would help to have this module version packaged in debian to avoid build on install on unsupported arch.
https://github.com/mapbox/node-sqlite3/issues/418
Anyway I'll keep an eye on it and will update this doc: https://github.com/rzr/webthing-iotjs/wiki/Gateway
I could install the package with a node 10.1 in linux. With node 10.2 node-pre-gyp fails with
missing file core.h