title: node.js forever cannot start script
body: <p>I have a node.js script on my server that I want to run continuously even after I logout of SSH. I decided to use forever for this.</p>
  
  <p><strong>Problem:</strong> When I try to start the node.js script using <code>forever start app.js</code>, I get the following error. Is there more configuration that is required?</p>
  
  <pre><code>The "sys" module is now called "util". It should have a similar interface.
  info:   Forever processing file: app.js
  {
    "process": {
      "pid": 24257,
      "uid": 0,
      "gid": 0,
      "cwd": "/home/node/nodejs",
      "execPath": "/usr/local/bin/node",
      "version": "v0.6.2",
      "argv": [
        "node",
        "/usr/local/bin/forever",
        "start",
        "app.js"
      ],
      "memoryUsage": {
        "rss": 13729792,
        "heapTotal": 8367232,
        "heapUsed": 5130572
      }
    },
    "os": {
      "loadavg": [
        0.02734375,
        0.0322265625,
        0.0009765625
      ],
      "uptime": 1474229.393550878
    },
    "trace": [
      {
        "column": 21,
        "file": "/usr/local/lib/node_modules/forever/lib/forever/cli.js",
        "function": "getOptions",
        "line": 172,
        "method": null,
        "native": false
      },
      {
        "column": 17,
        "file": "/usr/local/lib/node_modules/forever/lib/forever/cli.js",
        "function": "",
        "line": 210,
        "method": null,
        "native": false
      },
      {
        "column": 19,
        "file": "/usr/local/lib/node_modules/forever/node_modules/flatiron/node_modules/director/lib/director/router.js",
        "function": "apply",
        "line": 355,
        "method": null,
        "native": false
      },
      {
        "column": 9,
        "file": "/usr/local/lib/node_modules/forever/node_modules/flatiron/node_modules/director/lib/director/router.js",
        "function": "_every",
        "line": 28,
        "method": null,
        "native": false
      },
      {
        "column": 16,
        "file": "/usr/local/lib/node_modules/forever/node_modules/flatiron/node_modules/director/lib/director/router.js",
        "function": "apply",
        "line": 352,
        "method": null,
        "native": false
      },
      {
        "column": 9,
        "file": "/usr/local/lib/node_modules/forever/node_modules/flatiron/node_modules/director/lib/director/router.js",
        "function": "_every",
        "line": 28,
        "method": null,
        "native": false
      },
      {
        "column": 5,
        "file": "Object].invoke (/usr/local/lib/node_modules/forever/node_modules/flatiron/node_modules/director/lib/director/router.js",
        "function": "[object",
        "line": 350,
        "method": null,
        "native": false
      },
      {
        "column": 8,
        "file": "Object].dispatch (/usr/local/lib/node_modules/forever/node_modules/flatiron/node_modules/director/lib/director/cli.js",
        "function": "[object",
        "line": 67,
        "method": null,
        "native": false
      },
      {
        "column": 21,
        "file": "Object].start (/usr/local/lib/node_modules/forever/node_modules/flatiron/lib/flatiron/plugins/cli.js",
        "function": "[object",
        "line": 52,
        "method": null,
        "native": false
      },
      {
        "column": 9,
        "file": "/usr/local/lib/node_modules/forever/lib/forever/cli.js",
        "function": null,
        "line": 470,
        "method": null,
        "native": false
      }
    ],
    "stack": [
      "TypeError: Cannot call method 'reset' of undefined",
      "    at getOptions (/usr/local/lib/node_modules/forever/lib/forever/cli.js:172:21)",
      "    at Object.&lt;anonymous&gt; (/usr/local/lib/node_modules/forever/lib/forever/cli.js:210:17)",
      "    at apply (/usr/local/lib/node_modules/forever/node_modules/flatiron/node_modules/director/lib/director/router.js:355:19)",
      "    at _every (/usr/local/lib/node_modules/forever/node_modules/flatiron/node_modules/director/lib/director/router.js:28:9)",
      "    at apply (/usr/local/lib/node_modules/forever/node_modules/flatiron/node_modules/director/lib/director/router.js:352:16)",
      "    at _every (/usr/local/lib/node_modules/forever/node_modules/flatiron/node_modules/director/lib/director/router.js:28:9)",
      "    at [object Object].invoke (/usr/local/lib/node_modules/forever/node_modules/flatiron/node_modules/director/lib/director/router.js:350:5)",
      "    at [object Object].dispatch (/usr/local/lib/node_modules/forever/node_modules/flatiron/node_modules/director/lib/director/cli.js:67:8)",
      "    at [object Object].start (/usr/local/lib/node_modules/forever/node_modules/flatiron/lib/flatiron/plugins/cli.js:52:21)",
      "    at /usr/local/lib/node_modules/forever/lib/forever/cli.js:470:9"
    ],
    "level": "error",
    "message": "uncaughtException"
  }
  </code></pre>
  
  <p><strong>Additional Info</strong></p>
  
  <p>When installing forever using <code>npm install forever -g</code>, I get the following warnings, wonder if its relevant to the problem...</p>
  
  <pre><code>npm WARN eventemitter2@0.4.1 package.json: 'contributers' should probably be 'contributors'
  npm WARN request@2.1.1 package.json: bugs['web'] should probably be bugs['url']
  </code></pre>