ac130nz
By:
ac130nz

Installing Ghost ERROR: Exit status 1 / node index / ELIFECYCLE

June 19, 2017 928 views
Ghost Nginx Ubuntu

Ever since DO changed there one click install for Ghost to cost $10 instead of $5 saying you can't run ghost on a smaller droplet (which is total nonsense have a ghost blog running for 2-3 years on a $5 droplet.) I can't even manually install ghost on any sized droplet. I have tried about 7 different tuts and Ubuntu 14/16 and I run into a similar error each time.

My last error. "Exit status 1" could mean the "Node Versions" is not supported but from what I can tell "node v6.9.5" is?

This isn't even half my problems once I get ghost installed I need to find out how to move it a subfolder /blog/ and serve a static site from /.

npm ERR! Linux 4.4.0-78-generic
npm ERR! argv "/root/.nvm/v6.9.5/bin/node" "/root/.nvm/v6.9.5/bin/npm" "start" "--production"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! ghost@0.11.10 start: `node index`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ghost@0.11.10 start script 'node index'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ghost package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node index
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ghost
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ghost
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/ghost/npm-debug.log
3 comments
  • Hi @ac130nz Can you include the error log instead? /var/www/ghost/npm-debug.log

  • @ac130nz

    Please link to the tutorial or guide that you followed to install NodeJS and Ghost. I'd be happy to help you troubleshoot :-).

    Also, if you're able to post the contents of the error log, that may help us to troubleshoot instead of running through an entire installation from start to finish.

    ...

    As for NodeJS itself, I normally recommend using the repositories provided by NodeSource:

    https://github.com/nodesource/distributions

    They're always maintained and kept up to date. I've never ran in to any issues with their scripts and the end result has always been successful.

  • Thankyou for your help the guild I was using this time was a combination of https://www.digitalocean.com/community/tutorials/how-to-create-a-blog-with-ghost-and-nginx-on-ubuntu-14-04 and https://docs.ghost.org/v0.11.9/docs/installing-ghost-on-linux

    /var/www/ghost/npm-debug.log

    0 info it worked if it ends with ok
    1 verbose cli [ '/usr/local/bin/node',
    1 verbose cli   '/usr/local/bin/npm',
    1 verbose cli   'start',
    1 verbose cli   '--production' ]
    2 info using npm@3.10.10
    3 info using node@v6.9.5
    4 verbose run-script [ 'prestart', 'start', 'poststart' ]
    5 info lifecycle ghost@0.11.10~prestart: ghost@0.11.10
    6 silly lifecycle ghost@0.11.10~prestart: no script for prestart, continuing
    7 info lifecycle ghost@0.11.10~start: ghost@0.11.10
    8 verbose lifecycle ghost@0.11.10~start: unsafe-perm in lifecycle true
    9 verbose lifecycle ghost@0.11.10~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/var/www/ghost/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
    10 verbose lifecycle ghost@0.11.10~start: CWD: /var/www/ghost
    11 silly lifecycle ghost@0.11.10~start: Args: [ '-c', 'node index' ]
    12 silly lifecycle ghost@0.11.10~start: Returned: code: 1  signal: null
    13 info lifecycle ghost@0.11.10~start: Failed to exec start script
    14 verbose stack Error: ghost@0.11.10 start: `node index`
    14 verbose stack Exit status 1
    14 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
    14 verbose stack     at emitTwo (events.js:106:13)
    14 verbose stack     at EventEmitter.emit (events.js:191:7)
    14 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
    14 verbose stack     at emitTwo (events.js:106:13)
    14 verbose stack     at ChildProcess.emit (events.js:191:7)
    14 verbose stack     at maybeClose (internal/child_process.js:877:16)
    14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
    15 verbose pkgid ghost@0.11.10
    16 verbose cwd /var/www/ghost
    17 error Linux 4.4.0-78-generic
    18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" "--production"
    19 error node v6.9.5
    20 error npm  v3.10.10
    21 error code ELIFECYCLE
    22 error ghost@0.11.10 start: `node index`
    22 error Exit status 1
    23 error Failed at the ghost@0.11.10 start script 'node index'.
    23 error Make sure you have the latest version of node.js and npm installed.
    23 error If you do, this is most likely a problem with the ghost package,
    23 error not with npm itself.
    23 error Tell the author that this fails on your system:
    23 error     node index
    23 error You can get information on how to open an issue for this project with:
    23 error     npm bugs ghost
    23 error Or if that isn't available, you can get their info via:
    23 error     npm owner ls ghost
    23 error There is likely additional logging output above.
    24 verbose exit [ 1, true ]
    
    
    Ghost is a lightweight (~7.5MB), open source blogging platform which is really easy to use. Ghost is fully customizable. There are loads of themes available for Ghost on the Internet, free as well as paid. In this tutorial, we will go through the steps to get Ghost setup and running on your Ubuntu 14.04 system. We will also install Nginx to proxy ports and install `forever`, a node package, to keep Ghost running in the background.
1 Answer

@ac130nz
Interesting. I don't use Ghost, but that's not a very help error log it has generated.
Have you seen the updated version of the tutorial you're using?
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-ghost-on-ubuntu-16-04
Which will also has a tutorial for installing Node.js using PPA.
You might want to reset the droplet to a completely fresh Ubuntu 16.04 before starting.

Ghost is a light-weight open-source blogging platform which is easy to use. Ghost is fully customizable, with many themes available. In this tutorial, you'll set up Ghost on an Ubuntu 16.04 system. You'll will also configure Nginx to proxy requests to...
  • Have already tried exactly that with a completely fresh Ubuntu 16.04 install like 2-3 times now and following that tut, still the same thing, Thanks.

    • @ac130nz
      When running the npm start --production it gives a lot of errors in red before the npm ERR! you posted above:

      $ npm install sqlite3 --save
      Error: Cannot find module '/var/www/ghost/node_modules/sqlite3/lib/binding/node-v48-linux-x64/node_sqlite3.node'
      ...
      

      I then run npm install sqlite3 --save and npm start --production and now:

      Ghost is running in production...
      
      • Thanks for your time hansen, didn't work but I will use the one click install and then try what I want to try.

Have another answer? Share your knowledge.