jansmolders86 / mediacenterjs

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

Sqlitle error #219

Closed esfomeado closed 8 years ago

esfomeado commented 8 years ago

Running on windows:

info: Starting server module.js:340 throw err; ^

Error: Cannot find module 'C:\MediacenterJS\node_modules\sqlite3\lib\binding\node-v47-win32-x64\node_sqlite3.node' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:289:25) at Module.require (module.js:366:17) at require (module.js:385:17) at Object. (C:\MediacenterJS\node_modules\sqlite3\lib\sqlite3.js:4:15) at Module._compile (module.js:425:26) at Object.Module._extensions..js (module.js:432:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:313:12) at Module.require (module.js:366:17) at require (module.js:385:17) at Object. (C:\MediacenterJS\lib\utils\database-schema.js:2:14) at Module._compile (module.js:425:26) at Object.Module._extensions..js (module.js:432:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:313:12)

tracker1 commented 8 years ago

Did you experience errors with npm install?

jansmolders86 commented 8 years ago

Also, did you download the github master or the exe from the site? I just reinstalled the exe from the site with no issue.

esfomeado commented 8 years ago

Using the exe from the site.

I have this folder node-v46-win32-ia32 instead of node-v47-win32-x64.

jansmolders86 commented 8 years ago

How recently have you downloaded the exe? I pushed a new version 2 weeks ago. Also did you install node-gyp globally using "npm install node-gyp -g"

esfomeado commented 8 years ago

I just downloaded today again to test it and same problem. I haven't installed npm on my computer. I just download the .exe and executed and that error came up. Is there any need for me to run any npm commands?

jansmolders86 commented 8 years ago

argh! My PC simply doesn't show this error, very frustrating! Let me try on someone elses pc.

jansmolders86 commented 8 years ago

So I tried on another pc. from the getgo,I had issues with the master version. make sure you have the latest node version and make sure you have all the node-gyp dependencies installed: https://github.com/nodejs/node-gyp. Make sure to delete the entire node_modules folder and reinstall using npm install. Things worked just fine for me after. Would you mind trying that too?

The underlying issue here is that I wanted to package the node module into the exe so people don't have to install the node-gyp dependencies. You only really need them while doing a clean install. But the sqlite module is environment dependent. So I can't really do that :)

TRex22 commented 8 years ago

I found a quick fix for this: In the package.json change the sqlite3 entry to "sqlite3": "3.0.5", Thats seemed to fix the issue for me on the latest Windows release

jansmolders86 commented 8 years ago

Woot! Awesome! made the code change! Thanks @TRex22