-1

我试图从 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上试过这个,也有同样的错误。

谢谢

4

1 回答 1

0

You need to add express in your package.json

  "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"
  }

Try to use this dependencies in your package.json.

于 2014-07-10T22:05:54.280 回答