Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6899201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:23:31+00:00 2026-05-27T07:23:31+00:00

I have a node.js script on my server that I want to run continuously

  • 0

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.

Problem: When I try to start the node.js script using forever start app.js, I get the following error. Is there more configuration that is required?

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.<anonymous> (/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"
}

Additional Info

When installing forever using npm install forever -g, I get the following warnings, wonder if its relevant to the problem…

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']
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:23:32+00:00Added an answer on May 27, 2026 at 7:23 am

    To run process at the back end

    $ nohup node simple-server.js > output.log &
    

    The purpose of Forever is to keep a child process (such as your node.js web server) running continuously and automatically restart it when it exits unexpectedly. It’s worth mentioning that there are other tools written to accomplish this task in a more generic way for any program or programming language:

    Monit: http://mmonit.com/monit/
    Upstart: http://upstart.ubuntu.com/
    Daemontools: http://cr.yp.to/daemontools.html
    Launchtool: http://people.debian.org/~enrico/launchtool.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Upstart script for my server that looks like this: description myapp
We have a node js script that runs a command to execute the following
I have a node with many CCK fields. I want to hide a field
I have a binary tree where each node can have a value. I want
I want to have a tree in memory, where each node can have multiple
I have a PHP script that works by calling items from a database based
I have a node.js server written in express and at a certain moment I
(I only need functionality in Chrome) Context: I'm hacking together a node.js script that
I currently have node.js, express, and mongodb in my heroku environment. What I want
In my work with my professor I have to ssh into our server and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.