jansmolders86 / mediacenterjs

A HTML/CSS/Javascript (NodeJS) based Media center
http://mediacenterjs.com
1.29k stars 243 forks source link

SQLite Error #218

Closed koenigkill closed 8 years ago

koenigkill commented 8 years ago

I get an error that the dialect SQlite is not supported (see log). Which version of sqlite do I need to install ?

Log/Error :

(node) sys is deprecated. Use util instead. info: Starting server (node) util.print is deprecated. Use console.log instead. G:\MediacenterJS\node_modules\sequelize\lib\sequelize.js:205 throw new Error('The dialect ' + this.getDialect() + ' is not supported. ('+err+')'); ^

Error: The dialect sqlite is not supported. (Error: Please install sqlite3 package manually) at new Sequelize (G:\MediacenterJS\node_modules\sequelize\lib\sequelize.js:205:11) at Object. (G:\MediacenterJS\lib\utils\database-schema.js:2:17) at Module._compile (module.js:397:26) at Object.Module._extensions..js (module.js:404: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. (G:\MediacenterJS\lib\utils\device-utils.js:19:16) at Module._compile (module.js:397:26) at Object.Module._extensions..js (module.js:404: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. (G:\MediacenterJS\index.js:33:20)

jansmolders86 commented 8 years ago

Are you using Windows or Linux? Also which version of Node are you using?

koenigkill commented 8 years ago

Windows 10 and node v4.2.4 LTS

tracker1 commented 8 years ago

SQLite doesn't have prebuilt-binaries, you'll need the full environment tooling[1] in order to install sqlite.

[1] https://github.com/nodejs/node/wiki/Windows-Environment

jansmolders86 commented 8 years ago

@tracker1 Shouldn't this be enough though? https://github.com/jansmolders86/mediacenterjs-windows/blob/master/bin/sqlite3/sqlite3.exe

jansmolders86 commented 8 years ago

I just pushed a fix, defining sqlite in the code solved this issue. Should your sqlite module be acting up, please run: npm install sqlite --build-from-source

omgbox commented 8 years ago

info: Starting server module.js:327

throw err;
^

Error: Cannot find module 'sqlite3' 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. (/home/nodejs/Downloads/mediacenterjs/lib/utils/database-schema.js:2:14) at Module._compile (module.js:397:26) at Object.Module._extensions..js (module.js:404: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. (/home/nodejs/Downloads/mediacenterjs/lib/utils/device-utils.js:19:16) at Module._compile (module.js:397:26) at Object.Module._extensions..js (module.js:404: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. (/home/nodejs/Downloads/mediacenterjs/index.js:33:20) at Module._compile (module.js:397:26) at Object.Module._extensions..js (module.js:404:10) at Module.load (module.js:343:32)

jansmolders86 commented 8 years ago

did you try to run: npm install sqlite --build-from-source ?

koenigkill commented 8 years ago

im not him but it also didnt work for me (same error, even with npm install sqlite --build-from-source)

jansmolders86 commented 8 years ago

That's weird! let me try with a fresh install. worked fine on my machine

koenigkill commented 8 years ago

Reinstalled it and now im getting the following error from npm install sqlite --build-from-source:

C:\Users\Jesse Gaming Pc>npm install sqlite --build-from-source \

sqlite3@3.1.1 install C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3 node-pre-gyp install --fallback-to-build

C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3>if not defined npm_config_node_gyp (node "G:\Programmieren und son Zeug\Programmieren\JS\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node clean )

C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3>if not defined npm_config_node_gyp (node "G:\Programmieren und son Zeug\Programmieren\JS\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build "--module=C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3\lib\binding\node-v46-win32-x64\node_sqlite3.node" --module_name=node_sqlite3 "--module_path=C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3\lib\binding\node-v46-win32-x64" ) else (node configure --fallback-to-build "--module=C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3\lib\binding\node-v46-win32-x64\node_sqlite3.node" --module_name=node_sqlite3 "--module_path=C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3\lib\binding\node-v46-win32-x64" ) gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at failNoPython (G:\Programmieren und son Zeug\Programmieren\JS\node_modules\npm\node_modules\node-gyp\lib\configure.js:116:14) gyp ERR! stack at G:\Programmieren und son Zeug\Programmieren\JS\node_modules\npm\node_modules\node-gyp\lib\configure.js:71:11 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15) gyp ERR! System Windows_NT 10.0.10240 gyp ERR! command "G:\Programmieren und son Zeug\Programmieren\JS\node.exe" "G:\Programmieren und son Zeug\Programmieren\JS\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3\lib\binding\node-v46-win32-x64\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3\lib\binding\node-v46-win32-x64" gyp ERR! cwd C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3 gyp ERR! node -v v4.2.4 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3\lib\binding\node-v46-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3\lib\binding\node-v46-win32-x64' (1) node-pre-gyp ERR! stack at ChildProcess. (C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3\node_modules\node-pre-gyp\lib\util\compile.js:83: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:818:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) node-pre-gyp ERR! System Windows_NT 10.0.10240 node-pre-gyp ERR! command "G:\Programmieren und son Zeug\Programmieren\JS\node.exe" "C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3 node-pre-gyp ERR! node -v v4.2.4 node-pre-gyp ERR! node-pre-gyp -v v0.6.14 node-pre-gyp ERR! not ok Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3\lib\binding\node-v46-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Jesse Gaming Pc\node_modules\sqlite\node_modules\sqlite3\lib\binding\node-v46-win32-x64' (1) npm ERR! Windows_NT 10.0.10240 npm ERR! argv "G:\Programmieren und son Zeug\Programmieren\JS\node.exe" "G:\Programmieren und son Zeug\Programmieren\JS\node_modules\npm\bin\npm-cli.js" "install" "sqlite" "--build-from-source" npm ERR! node v4.2.4 npm ERR! npm v2.14.12 npm ERR! code ELIFECYCLE

npm ERR! sqlite3@3.1.1 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sqlite3@3.1.1 install script 'node-pre-gyp install --fallback-to-build'. npm ERR! 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 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! C:\Users\Jesse Gaming Pc\npm-debug.log

I somehow can't upload the log document here

jansmolders86 commented 8 years ago

Seems like a node-gyp issue. Did you try installing the latest release? It has all the dependencies preinstalled:

https://github.com/jansmolders86/mediacenterjs/releases/tag/v0.1.3

jansmolders86 commented 8 years ago

Did you try the exe from the site mediacenterjs.com ? I just reinstalled the exe from the site with no issue.

koenigkill commented 8 years ago

Yeah that didn't work, I think I'll give up, but thanks for the help.

Jan Smolders notifications@github.com schrieb am Mi., 10. Feb. 2016, 10:45:

Did you try the exe from the site mediacenterjs.com ? I just reinstalled the exe from the site with no issue.

— Reply to this email directly or view it on GitHub https://github.com/jansmolders86/mediacenterjs/issues/218#issuecomment-182281534 .

jansmolders86 commented 8 years ago

No worries, thanks for trying. Come back in a couple of weeks/months. Hopefully I'll have things smoothed out by then!