jansmolders86 / mediacenterjs

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

Unable to start mediacenterjs on Windows 10 #229

Closed syaifulnizamyahya closed 5 years ago

syaifulnizamyahya commented 7 years ago

When I start mediacenterjs, a console screen just flashes. Then I install nodejs(latest stable, windows, 64bit). After that, I get this error

(node:7684) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
info: Starting server
(node:13084) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.

module.js:471
    throw err;
    ^

Error: Cannot find module 'C:\MediacenterJS\node_modules\sqlite3\lib\binding\node-v48-win32-x64\node_sqlite3.node'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\MediacenterJS\node_modules\sqlite3\lib\sqlite3.js:4:15)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\MediacenterJS\lib\utils\database-schema.js:2:14)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)

What should I do?

Kurosar commented 7 years ago

C:\MediacenterJS>mediacenterjs.exe module.js:474 throw err; ^

Error: Cannot find module 'internal/fs' at Function.Module._resolveFilename (module.js:472:15) at Function.Module._load (module.js:420:25) at Module.require (module.js:500:17) at require (internal/module.js:20:19) at evalmachine.:17:20 at Object. (C:\MediacenterJS\node_modules\fs-extra\node_modules\graceful-fs\fs.js:11:1) at Module._compile (module.js:573:32) at Object.Module._extensions..js (module.js:582:10) at Module.load (module.js:490:32) at tryModuleLoad (module.js:449:12)

This is the error I get (Windows Server 2016 + Node 7.0.0)

:information_source: EDIT1 : Fixed by installing Node 6.9.1 :information_source: EDIT2 : Now I encounter a new error

info: Restarting because of changed file module.js:471 throw err; ^

Error: Cannot find module 'C:\MediacenterJS\node_modules\sqlite3\lib\binding\node-v48-win32-x64\node_sqlite3.node' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\MediacenterJS\node_modules\sqlite3\lib\sqlite3.js:4:15) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\MediacenterJS\lib\utils\database-schema.js:2:14) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32)

info: Stopping server for restart

:information_source: EDIT3 : Deleted the "C:\MediacenterJS\node_modules\sqlite3" folder and ran "npm i sqlite3" from the C:\MediacenterJS folder.

:white_check_mark: **This fixed it for me, full fix below :

  1. Installing Node 6.9.1
  2. Deleting the Sqlite folder and running "npm i sqlite3" from a command line**

Could you try the fix and mark the issue as solved if it fixed it for you ? (Also make sure to comment on the issue to tell us if it fixed it for you)

syaifulnizamyahya commented 7 years ago

Did what you suggest.

  1. Installing Node 6.9.1
  2. Deleting the Sqlite folder and running "npm i sqlite3" from a command line

THese are the errors that I get

(node:9036) fs: re-evaluating native module sources is not supported. If you are
 using the graceful-fs module, please update it to a more recent version.
info: Starting server
(node:5928) fs: re-evaluating native module sources is not supported. If you are
 using the graceful-fs module, please update it to a more recent version.

info: socket.io started
socket setup
info:
   movies:
info:      GET /movies/ -> index
info:      GET /movies/:id/:optionalParam?/:action? -> get
info:      POST /movies/:id/:optionalParam?/:action? -> post
info:
   music:
info:      GET /music/ -> index
info:      GET /music/:id/:optionalParam?/:action? -> get
info:      POST /music/:id/:optionalParam?/:action? -> post
info:
   plugins:
info:      GET /plugins/ -> index
info:      GET /plugins/:id/:optionalParam?/:action? -> get
info:
   remote:
info:      GET /remote/ -> index
info:
   settings:
info:      GET /settings/ -> index
info:      GET /settings/:id/:optionalParam?/:action? -> get
info:
   tv:
info:      GET /tv/ -> index
info:      GET /tv/:id/:optionalParam?/:action? -> get
info:      POST /tv/:id/:optionalParam?/:action? -> post
info:
   weather:
info:      GET /weather/ -> index
info: Scheduled task set for: 15:30
warn: First run, Setup running on localhost: port=3000
(node:5928) DeprecationWarning: process.EventEmitter is deprecated. Use require(
'events') instead.

Executing (default): SELECT COUNT(id) ct FROM SequelizeMeta
Unhandled rejection SequelizeDatabaseError: SQLITE_ERROR: no such table: Sequeli
zeMeta
    at Query.formatError (C:\MediacenterJS\node_modules\sequelize\lib\dialects\s
qlite\query.js:328:14)
    at afterExecute (C:\MediacenterJS\node_modules\sequelize\lib\dialects\sqlite
\query.js:100:29)
    at replacement (C:\MediacenterJS\node_modules\sqlite3\lib\trace.js:19:31)
    at Statement.errBack (C:\MediacenterJS\node_modules\sqlite3\lib\sqlite3.js:1
6:21)

Executing (9335906e-6964-4628-af8d-e6ccf3e3b16e): BEGIN TRANSACTION;
Executing (9335906e-6964-4628-af8d-e6ccf3e3b16e): -- SQLite is not able to choos
e the isolation level REPEATABLE READ.
Executing (9335906e-6964-4628-af8d-e6ccf3e3b16e): -- SQLite does not support SET
 autocommit.
Executing (9335906e-6964-4628-af8d-e6ccf3e3b16e): SELECT `id`, `deviceID`, `last
Seen`, `isAllowed` FROM `Devices` AS `Device` WHERE `Device`.`deviceID` = 'windo
ws_::1' LIMIT 1;
Executing (9335906e-6964-4628-af8d-e6ccf3e3b16e): INSERT INTO `Devices` (`id`,`d
eviceID`,`lastSeen`,`isAllowed`) VALUES (NULL,'windows_::1','2016-11-05 01:50:22
','yes');
Executing (9335906e-6964-4628-af8d-e6ccf3e3b16e): COMMIT;
PraveenkumarDonga commented 7 years ago

I followed the same in my PC. Its working.

Nemesis24 commented 7 years ago

I followed the same on my pc windows10 and i've got

Executing (b5fac052-72b0-4291-8fd5-3fbcb4988103): -- SQLite is not able to choose the isolation level REPEATABLE READ.
Executing (b5fac052-72b0-4291-8fd5-3fbcb4988103): -- SQLite does not support SET autocommit.

and

Warning: missing space before text for line 91 of jade file "C:\MediacenterJS\apps\music\views\music.jade"