Closed sarathkcm closed 7 years ago
Installing sqlite3 locally on C:\MediacenterJs worked [though is is expected of the MediacenterJS installer to take care of this installation].
Good work on the application...
I have a problem starting the application as well, also due to an sqlite error (module not found):
Here's the output of npm update:
osboxes@osboxes ~/mediacenterjs> npm update
▌ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine sqlite3@3.0.5: wanted: {"node":">= 0.10.0 < 0.11.0 || >= 0.11.13 < 0.13.0 || >= 1.0.0 < 2.0.0"} (current: {"node":"4.2.6","npm":"3.5.2"})
WARN engine sqlite3@3.0.5: wanted: {"node":">= 0.10.0 < 0.11.0 || >= 0.11.13 < 0.13.
> sqlite3@3.0.5 install /home/osboxes/mediacenterjs/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
make: Entering directory '/home/osboxes/mediacenterjs/node_modules/sqlite3/build'
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3080701/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3080701/sqlite3.o
Release/obj/gen/sqlite-autoconf-3080701/sqlite3.c: In function ‘balance’:
Release/obj/gen/sqlite-autoconf-3080701/sqlite3.c:58982:22: warning: array subscript is above array bounds [-Warray-bounds]
pOld = apCopy[++j];
^
AR(target) Release/obj.target/deps/sqlite3.a
COPY Release/sqlite3.a
CXX(target) Release/obj.target/node_sqlite3/src/database.o
In file included from ../node_modules/nan/nan_new.h:190:0,
from ../node_modules/nan/nan.h:74,
from ../src/database.h:11,
from ../src/database.cc:5:
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static NanIntern::FactoryBase<v8::Signature>::return_t NanIntern::Factory<v8::Signature>::New(NanIntern::Factory<v8::Signature>::FTH, int, NanIntern::Factory<v8::Signature>::FTH*)’:
../node_modules/nan/nan_implementation_12_inl.h:181:76: error: no matching function for call to ‘v8::Signature::New(v8::Isolate*, NanIntern::Factory<v8::Signature>::FTH&, int&, NanIntern::Factory<v8::Signature>::FTH*&)’
return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
^
In file included from /home/osboxes/.node-gyp/4.2.6/include/node/node.h:42:0,
from ../src/database.cc:2:
/home/osboxes/.node-gyp/4.2.6/include/node/v8.h:4675:27: note: candidate: static v8::Local<v8::Signature> v8::Signature::New(v8::Isolate*, v8::Local<v8::FunctionTemplate>)
static Local<Signature> New(
^
/home/osboxes/.node-gyp/4.2.6/include/node/v8.h:4675:27: note: candidate expects 2 arguments, 4 provided
In file included from ../src/database.h:11:0,
from ../src/database.cc:5:
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:165:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
^
../node_modules/nan/nan.h:160:25: note: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
^
../node_modules/nan/nan.h:557:13: error: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h:557:35: error: expected ‘,’ or ‘...’ before ‘callback’
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../node_modules/nan/nan.h:561:50: error: ‘callback’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h:561:60: error: ‘hint’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/nan/nan.h:568:67: error: no matching function for call to ‘New(v8::Isolate*, const char*&, uint32_t&)’
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
In file included from ../node_modules/nan/nan.h:25:0,
from ../src/database.h:11,
from ../src/database.cc:5:
/home/osboxes/.node-gyp/4.2.6/include/node/node_buffer.h:31:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/home/osboxes/.node-gyp/4.2.6/include/node/node_buffer.h:31:40: note: conversion of argument 3 would be ill-formed:
In file included from ../src/database.h:11:0,
from ../src/database.cc:5:
../node_modules/nan/nan.h:568:67: error: invalid conversion from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’ [-fpermissive]
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
In file included from ../node_modules/nan/nan.h:25:0,
from ../src/database.h:11,
from ../src/database.cc:5:
/home/osboxes/.node-gyp/4.2.6/include/node/node_buffer.h:43:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/home/osboxes/.node-gyp/4.2.6/include/node/node_buffer.h:43:40: note: conversion of argument 2 would be ill-formed:
In file included from ../src/database.h:11:0,
from ../src/database.cc:5:
../node_modules/nan/nan.h:568:67: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../node_modules/nan/nan.h:572:29: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../node_modules/nan/nan.h:579:12: error: ‘Use’ is not a member of ‘node::Buffer’
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_BeginOpen(node_sqlite3::Database::Baton*)’:
../src/database.cc:145:9: warning: unused variable ‘status’ [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_BeginClose(node_sqlite3::Database::Baton*)’:
../src/database.cc:230:9: warning: unused variable ‘status’ [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_BeginExec(node_sqlite3::Database::Baton*)’:
../src/database.cc:509:9: warning: unused variable ‘status’ [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_BeginLoadExtension(node_sqlite3::Database::Baton*)’:
../src/database.cc:610:9: warning: unused variable ‘status’ [-Wunused-variable]
int status = uv_queue_work(uv_default_loop(),
^
node_sqlite3.target.mk:110: recipe for target 'Release/obj.target/node_sqlite3/src/database.o' failed
make: *** [Release/obj.target/node_sqlite3/src/database.o] Error 1
make: Leaving directory '/home/osboxes/mediacenterjs/node_modules/sqlite3/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/osboxes/mediacenterjs/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
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-31-generic
gyp ERR! command "/usr/bin/nodejs" "/home/osboxes/mediacenterjs/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--name=sqlite3" "--configuration=Release" "--module_name=node_sqlite3" "--version=3.0.5" "--major=3" "--patch=5" "--runtime=node" "--node_abi=node-v46" "--platform=linux" "--target_platform=linux" "--arch=x64" "--target_arch=x64" "--module_main=./lib/sqlite3" "--host=https://mapbox-node-binary.s3.amazonaws.com/" "--module_path=/home/osboxes/mediacenterjs/node_modules/sqlite3/lib/binding/node-v46-linux-x64" "--module=/home/osboxes/mediacenterjs/node_modules/sqlite3/lib/binding/node-v46-linux-x64/node_sqlite3.node" "--remote_path=./sqlite3/v3.0.5/" "--package_name=node-v46-linux-x64.tar.gz" "--staged_tarball=build/stage/sqlite3/v3.0.5/node-v46-linux-x64.tar.gz" "--hosted_path=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.0.5/" "--hosted_tarball=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.0.5/node-v46-linux-x64.tar.gz"
gyp ERR! cwd /home/osboxes/mediacenterjs/node_modules/sqlite3
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/nodejs /home/osboxes/mediacenterjs/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js rebuild --name=sqlite3 --configuration=Release --module_name=node_sqlite3 --version=3.0.5 --major=3 --patch=5 --runtime=node --node_abi=node-v46 --platform=linux --target_platform=linux --arch=x64 --target_arch=x64 --module_main=./lib/sqlite3 --host=https://mapbox-node-binary.s3.amazonaws.com/ --module_path=/home/osboxes/mediacenterjs/node_modules/sqlite3/lib/binding/node-v46-linux-x64 --module=/home/osboxes/mediacenterjs/node_modules/sqlite3/lib/binding/node-v46-linux-x64/node_sqlite3.node --remote_path=./sqlite3/v3.0.5/ --package_name=node-v46-linux-x64.tar.gz --staged_tarball=build/stage/sqlite3/v3.0.5/node-v46-linux-x64.tar.gz --hosted_path=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.0.5/ --hosted_tarball=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.0.5/node-v46-linux-x64.tar.gz' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/osboxes/mediacenterjs/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:71:29)
node-pre-gyp ERR! stack at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:821:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Linux 4.4.0-31-generic
node-pre-gyp ERR! command "/usr/bin/nodejs" "/home/osboxes/mediacenterjs/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/osboxes/mediacenterjs/node_modules/sqlite3
node-pre-gyp ERR! node -v v4.2.6
node-pre-gyp ERR! node-pre-gyp -v v0.6.2
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/nodejs /home/osboxes/mediacenterjs/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js rebuild --name=sqlite3 --configuration=Release --module_name=node_sqlite3 --version=3.0.5 --major=3 --patch=5 --runtime=node --node_abi=node-v46 --platform=linux --target_platform=linux --arch=x64 --target_arch=x64 --module_main=./lib/sqlite3 --host=https://mapbox-node-binary.s3.amazonaws.com/ --module_path=/home/osboxes/mediacenterjs/node_modules/sqlite3/lib/binding/node-v46-linux-x64 --module=/home/osboxes/mediacenterjs/node_modules/sqlite3/lib/binding/node-v46-linux-x64/node_sqlite3.node --remote_path=./sqlite3/v3.0.5/ --package_name=node-v46-linux-x64.tar.gz --staged_tarball=build/stage/sqlite3/v3.0.5/node-v46-linux-x64.tar.gz --hosted_path=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.0.5/ --hosted_tarball=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.0.5/node-v46-linux-x64.tar.gz' (1)
mediacenterjs@0.1.3 /home/osboxes/mediacenterjs
├── abbrev@1.0.9
├── aproba@1.0.4
├── fstream@1.0.10
├── glob@7.0.5
├── has-unicode@2.0.1
├── node-gyp@3.4.0
├── npm@3.10.6
├── npm-package-arg@4.2.0
├── npm-user-validate@0.1.5
├── read-package-tree@5.1.5
├── readable-stream@2.1.4
├── rimraf@2.5.4
├── sqlite@2.2.0 extraneous
├── which@1.2.10
└── wrappy@1.0.2
npm WARN mediacenterjs@0.1.3 license should be a valid SPDX license expression
npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "update"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! sqlite3@3.0.5 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@3.0.5 install script 'node-pre-gyp install --fallback-to-build'.
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 sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sqlite3
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls sqlite3
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/osboxes/mediacenterjs/npm-debug.log
Can you go into a clean directory, and do an npm i sqlite@3.0.5
see if you get the same error, also try just doing npm i sqlite3
on its' own, which will give you the latest. if sqlite3 by itself installs... try updating package.json to change the 3.0.5
for sqlite3 to ~3.1.4
it could be needed for the newer node version you're using...
Just suggestions, I'm not currently running this application.
@tracker1
I tried your suggestions and the npm i sqlite3
in a clean directory worked, so I went in and deleted the sqlite3 directory from the /mediacenterjs/node_modules directory and removed the sql line from package.json. Then ran npm i sqlite3
from in the /mediacenterjs/ directory with succes. After that the app started up.
Many thanks for your help!
@thinkbig1979 glad it worked for you.
@jansmolders86 should bump the sqlite3
reference in package.json to ~3.1.4
, which is the current version.
I had this issue as well. I ran the npm i sqlite3 command and then replaced the existing sqlite subdir with the corresponding dir from the new copy. That worked. No other modifications were required. This was done in a Windows 10 computer.
BTW - this works quite well on the Xbox One. nice work!
Startup fails with exception
Cannot find module 'C:\MediacenterJS\node_modules\sqlite3\lib\binding\node-v46-win32-x64\node_sqlite3.node' at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object. (C:\MediacenterJS\node_modules\sqlite3\lib\sqlite3.js:4:15)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\MediacenterJS\lib\utils\database-schema.js:2:14)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
I have tried installing sqlite3 globally...
Nice application btw, screenshots look really good.