如何在nodejitsu上部署此应用程序(https://github.com/HenrikJoreteg/SimpleWebRTC)?

时间:2014-07-10 21:57:11

标签: node.js nodejitsu

我试图在nodejitsu上从SimpleWebRTC部署这个演示应用程序(https://github.com/HenrikJoreteg/SimpleWebRTC)。但是我收到了以下错误。

jitsu start

我收到此错误:

info:    Welcome to Nodejitsu nole
info:    jitsu v0.13.18, node v0.10.13
info:    It worked if it ends with Nodejitsu ok
info:    Executing command start
info:    Starting app simplewebrtc
error:   Error running command start
error:   Errors occured while starting the application
error:   Error output from application. This is usually a user error.
error:
error:   module.js:340
error:       throw err;
error:             ^
error:   Error: Cannot find module 'express'
error:       at Function.Module._resolveFilename (module.js:338:15)
error:       at Function.Module._load (module.js:280:25)
error:       at Module.require (module.js:364:17)
error:       at require (module.js:380:17)
error:       at Object.<anonymous> (/opt/run/snapshot/package/server.js:3:15)
error:       at Module._compile (module.js:456:26)
error:       at Object.Module._extensions..js (module.js:474:10)
error:       at Module.load (module.js:356:32)
error:       at Function.Module._load (module.js:312:12)
error:       at Function.Module.runMain (module.js:497:10)
error:
error:   Error starting application. This could be a user error.
error:   info: Running start for app.
error:   info: Reading `package.json`...
error:   info: Starting application...
error:   info: Spawn: start --min-uptime 2000 -o /opt/run/forza.log -- forza -h
multiplex.nodejitsu.com -p 8556 --start-log /opt/run/start.log --app-user nole -
-app-name simplewebrtc -- node server.js
error:   info: `aeternum` pid: 96350
error:   info: Writing pidfile: /root/app.pid
error:   info: Tailing forza log: /opt/run/start.log
error:   info: Tail closing..
error:   info: Success:start
error:

它在本地计算机上运行正常。而且,package.json也包含在部署中。我在heroku上尝试了这个,也遇到了同样的错误。

由于

1 个答案:

答案 0 :(得分:0)

您需要在package.json

中添加express
  "dependencies": {
    "express":"*",
    "webrtcsupport": "0.7.3",
    "wildemitter": "1.x",
    "socket.io-client": "0.9.16",
    "attachmediastream": "1.0.1",
    "webrtc": "1.11.x",
    "mockconsole": "0.0.1"
  }

尝试在package.json中使用此依赖项。