Błąd serwera Node.js

0

Witam przy uruchamianiu tego chata wyskakuje mi błąd https://github.com/winterbe/chaya
Mam zainstalowany node -v
v6.3.1
Uruchamiam na porcie 5000
<ort>
Express
500 TypeError: Path must be a string. Received null
at assertPath (path.js11)
at join (path.js7)
at exports.send (/home/rod/Node/chaya-master/node_modules/connect/lib/middleware/static.js20)
at ServerResponse.res.sendfile (/home/rod/Node/chaya-master/node_modules/express/lib/response.js3)
at /home/rod/Node/chaya-master/src/server.js9
at callbacks (/home/rod/Node/chaya-master/node_modules/express/lib/router/index.js11)
at param (/home/rod/Node/chaya-master/node_modules/express/lib/router/index.js11)
at pass (/home/rod/Node/chaya-master/node_modules/express/lib/router/index.js5)
at Router._dispatch (/home/rod/Node/chaya-master/node_modules/express/lib/router/index.js5)
at Object.Router.middleware [as handle] (/home/rod/Node/chaya-master/node_modules/express/lib/router/index.js10)
</ort>

0
Express
500 TypeError: Path must be a string. Received null
at assertPath (path.js:7:11)
at join (path.js:1213:7)
at exports.send (/home/rod/Node/chaya-master/node_modules/connect/lib/middleware/static.js:129:20)
at ServerResponse.res.sendfile (/home/rod/Node/chaya-master/node_modules/express/lib/response.js:186:3)
at /home/rod/Node/chaya-master/src/server.js:19:9
at callbacks (/home/rod/Node/chaya-master/node_modules/express/lib/router/index.js:272:11)
at param (/home/rod/Node/chaya-master/node_modules/express/lib/router/index.js:246:11)
at pass (/home/rod/Node/chaya-master/node_modules/express/lib/router/index.js:253:5)
at Router._dispatch (/home/rod/Node/chaya-master/node_modules/express/lib/router/index.js:280:5)
at Object.Router.middleware [as handle] (/home/rod/Node/chaya-master/node_modules/express/lib/router/index.js:45:10)
 
0

U mnie działa ...

marek2:~/workspace $ git clone https://github.com/winterbe/chaya.git
Cloning into 'chaya'...
remote: Counting objects: 316, done.
remote: Total 316 (delta 0), reused 0 (delta 0), pack-reused 316
Receiving objects: 100% (316/316), 294.97 KiB | 0 bytes/s, done.
Resolving deltas: 100% (163/163), done.
Checking connectivity... done.
marek2:~/workspace $ cd chaya/
marek2:~/workspace/chaya (master) $ npm update
[email protected] node_modules/express
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected] ([email protected])

> [email protected] install /home/ubuntu/workspace/chaya/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/home/ubuntu/workspace/chaya/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
make: Leaving directory `/home/ubuntu/workspace/chaya/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
[email protected] node_modules/socket.io
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected], [email protected])
marek2:~/workspace/chaya (master) $ npm list
[email protected] /home/ubuntu/workspace/chaya
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
└─┬ [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  └─┬ [email protected]
    ├─┬ [email protected]
    │ └── [email protected]
    ├── [email protected]
    ├─┬ [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ ├── [email protected]
    │ └── [email protected]
    └── [email protected]

marek2:~/workspace/chaya (master) $ node src/server.js 
   info  - socket.io started
heroku doesnt support websockets. setting up xhr-polling...
^C
marek2:~/workspace/chaya (master) $
0

A u mnie wszystko jest to samo i nie działa, wyskakuje:

 node src/server.js
   info  - socket.io started
(node:30432) DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead.
0

Możesz bardziej szczegółowo opisać co nie działa?
DeprecationWarning możesz się pozbyć przez https://github.com/LearnBoost/websocket.io/issues/55

0

Też to znalazłem w google i pozmieniałem w tych 4 plikach w katalogu websocket na var EventEmitter = require('events')
i odpalam localhost:5000 i nadal

Express
500 TypeError: Path must be a string. Received null
at assertPath (path.js:7:11)
at join (path.js:1213:7)
at exports.send (/home/rod/Node/chaya/node_modules/connect/lib/middleware/static.js:129:20)
at ServerResponse.res.sendfile (/home/rod/Node/chaya/node_modules/express/lib/response.js:186:3)
at /home/rod/Node/chaya/src/server.js:19:9
at callbacks (/home/rod/Node/chaya/node_modules/express/lib/router/index.js:272:11)
at param (/home/rod/Node/chaya/node_modules/express/lib/router/index.js:246:11)
at pass (/home/rod/Node/chaya/node_modules/express/lib/router/index.js:253:5)
at Router._dispatch (/home/rod/Node/chaya/node_modules/express/lib/router/index.js:280:5)
at Object.Router.middleware [as handle] (/home/rod/Node/chaya/node_modules/express/lib/router/index.js:45:10)
 
0

Czyli wychodzi na to że muszę używać starszej wersji node z serii 5? Z innym serwerem czata też ten sam błąd mi się pojawia i nie mogę uruchomić. Ale nie wiem jak przywrócić czy zainstalować starsza wersję node, npm ma jakieś polecenie jak pip install django==1.8 w pythonie?

0

A na jakiej to wersji node odpaliłeś, mam teraz numerek v6.4.0 i to samo mi wyskakuje, to jest jakiś bug czy jak.

1 użytkowników online, w tym zalogowanych: 0, gości: 1