lets-chat icon indicating copy to clipboard operation
lets-chat copied to clipboard

Error: ENOENT, no such file or directory 'key.pem'

Open arkag opened this issue 10 years ago • 30 comments

Not entirely sure what's going wrong. I don't really know where to start troubleshooting this. I have MongoDB version 3.2.1 running.

root@testing:~/lets-chat# npm start

> [email protected] prestart /root/lets-chat
> migroose


> [email protected] start /root/lets-chat
> node app.js


fs.js:432
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory 'key.pem'
    at Object.fs.openSync (fs.js:432:18)
    at Object.fs.readFileSync (fs.js:286:15)
    at Object.<anonymous> (/root/lets-chat/app.js:44:17)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3
npm ERR! weird error 8
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0

Not sure what to do. Any ideas?

arkag avatar Jan 20 '16 17:01 arkag

@basilosaurus You seem to have set a TLS encryption Key in your settings.yml that doesn't exist. Check either the https or the xmpp key. :)

bascht avatar Jan 20 '16 19:01 bascht

Yup you need to specify a key and certificate if you enable tls:


https:
  enable: true
  port: 5001
  key: key.pem
  cert: certificate.pem

I highly recommend using an nginx proxy for this kind of stuff though.

hhaidar avatar Jan 20 '16 19:01 hhaidar

This is for a test container. I don't plan on using this in production. Thank you for the help! I'll try this right now.

arkag avatar Jan 20 '16 20:01 arkag

New error


root@testing:~/lets-chat# npm start

> [email protected] prestart /root/lets-chat
> migroose


> [email protected] start /root/lets-chat
> node app.js

TypeError: Object #<Object> has no method 'needsMigration'
    at /root/lets-chat/app.js:269:14
    at open (/root/lets-chat/node_modules/mongoose/lib/connection.js:488:17)
    at NativeConnection.Connection.onOpen (/root/lets-chat/node_modules/mongoose/lib/connection.js:498:5)
    at /root/lets-chat/node_modules/mongoose/lib/connection.js:457:10
    at /root/lets-chat/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:54:5
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/db.js:229:5
    at connectHandler (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/server.js:279:7)
    at g (events.js:180:16)
    at EventEmitter.emit (events.js:95:17)
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:399:23
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:765:13
    at Callbacks.emit (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:95:3)
    at null.messageHandler (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:243:23)
    at Socket.<anonymous> (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:262:22)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:746:14)

/root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/server.js:282
      process.nextTick(function() { throw err; })
                                          ^
TypeError: Object #<Object> has no method 'needsMigration'
    at /root/lets-chat/app.js:269:14
    at open (/root/lets-chat/node_modules/mongoose/lib/connection.js:488:17)
    at NativeConnection.Connection.onOpen (/root/lets-chat/node_modules/mongoose/lib/connection.js:498:5)
    at /root/lets-chat/node_modules/mongoose/lib/connection.js:457:10
    at /root/lets-chat/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:54:5
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/db.js:229:5
    at connectHandler (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/server.js:279:7)
    at g (events.js:180:16)
    at EventEmitter.emit (events.js:95:17)
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:399:23
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:765:13
    at Callbacks.emit (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:95:3)
    at null.messageHandler (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:243:23)
    at Socket.<anonymous> (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:262:22)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:746:14)
npm ERR! weird error 8
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0

arkag avatar Jan 20 '16 20:01 arkag

What's your node version?

hhaidar avatar Jan 20 '16 20:01 hhaidar

nodejs -v
v0.10.25

arkag avatar Jan 20 '16 20:01 arkag

Yea you'll need to either symlink or alias node (your binary is called nodejs, needs to be node), see: http://stackoverflow.com/questions/21168141/cannot-install-packages-using-node-package-manager-in-ubuntu

hhaidar avatar Jan 20 '16 20:01 hhaidar

It's already been symlinked.

root@testing:~# ls -lah  /usr/bin | grep -i node
lrwxrwxrwx  1 root   root      15 Jan 20 17:09 node -> /usr/bin/nodejs
lrwxrwxrwx  1 root   root      33 Oct 22  2013 node-gyp -> ../share/node-gyp/bin/node-gyp.js
-rwxr-xr-x  1 root   root    1.4M Mar 27  2014 nodejs
lrwxrwxrwx  1 root   root      27 Oct 22  2013 rimraf -> ../lib/nodejs/rimraf/bin.js
lrwxrwxrwx  1 root   root      31 Aug 25  2013 semver -> ../lib/nodejs/semver/bin/semver

arkag avatar Jan 20 '16 20:01 arkag

@basilosaurus oh darn, let's try reinstalling then:

mongo YOUR_DATABASE_NAME --eval 'db.migrootions.drop()'
rm -rf node_modules
npm cache clean
npm install
npm run-script migrate
node app.js

hhaidar avatar Jan 20 '16 20:01 hhaidar

I don't think I ever named my database.

arkag avatar Jan 20 '16 20:01 arkag

@basilosaurus it's letschat by default then, so something like:

mongo letschat --eval 'db.migrootions.drop()'

hhaidar avatar Jan 20 '16 20:01 hhaidar

root@testing:~# mongo letschat --eval 'db.migrootions.drop()'
MongoDB shell version: 3.2.1
connecting to: letschat
true
root@testing:~# rm -rf node_modules
root@testing:~# npm install
npm ERR! install Couldn't read dependencies
npm ERR! Error: ENOENT, open '/root/package.json'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>

npm ERR! System Linux 3.13.0-68-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /root
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /root/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /root/npm-debug.log
npm ERR! not ok code 0

arkag avatar Jan 20 '16 20:01 arkag

Make sure you run it in the directory that let's chat is in

hhaidar avatar Jan 20 '16 20:01 hhaidar

Sorry about that. Seems to be the same error.


root@testing:~/lets-chat# npm start

> [email protected] prestart /root/lets-chat
> migroose


> [email protected] start /root/lets-chat
> node app.js

TypeError: Object #<Object> has no method 'needsMigration'
    at /root/lets-chat/app.js:269:14
    at open (/root/lets-chat/node_modules/mongoose/lib/connection.js:488:17)
    at NativeConnection.Connection.onOpen (/root/lets-chat/node_modules/mongoose/lib/connection.js:$98:5)
    at /root/lets-chat/node_modules/mongoose/lib/connection.js:457:10
    at /root/lets-chat/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:54:5
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/db.js:229:5
    at connectHandler (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/server.js:279$7)
    at g (events.js:180:16)
    at EventEmitter.emit (events.js:95:17)
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/top$logies/server.js:399:23
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/top$logies/server.js:765:13
    at Callbacks.emit (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mong$db-core/lib/topologies/server.js:95:3)
    at null.messageHandler (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules$mongodb-core/lib/topologies/server.js:243:23)
    at Socket.<anonymous> (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/$ongodb-core/lib/connection/connection.js:262:22)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:746:14)

/root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/server.js:282
      process.nextTick(function() { throw err; })
                                          ^

TypeError: Object #<Object> has no method 'needsMigration'
    at /root/lets-chat/app.js:269:14
    at open (/root/lets-chat/node_modules/mongoose/lib/connection.js:488:17)
    at NativeConnection.Connection.onOpen (/root/lets-chat/node_modules/mongoose/lib/connection.js:498:5)
    at /root/lets-chat/node_modules/mongoose/lib/connection.js:457:10
    at /root/lets-chat/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:54:5
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/db.js:229:5
    at connectHandler (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/server.js:279:7)
    at g (events.js:180:16)
    at EventEmitter.emit (events.js:95:17)
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:399:23
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:765:13
    at Callbacks.emit (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:95:3)
    at null.messageHandler (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:243:23)
    at Socket.<anonymous> (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:262:22)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:746:14)

/root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/server.js:282
      process.nextTick(function() { throw err; })
                                          ^
TypeError: Object #<Object> has no method 'needsMigration'
    at /root/lets-chat/app.js:269:14
    at open (/root/lets-chat/node_modules/mongoose/lib/connection.js:488:17)
    at NativeConnection.Connection.onOpen (/root/lets-chat/node_modules/mongoose/lib/connection.js:498:5)
    at /root/lets-chat/node_modules/mongoose/lib/connection.js:457:10
    at /root/lets-chat/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:54:5
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/db.js:229:5
    at connectHandler (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/server.js:279:7)
    at g (events.js:180:16)
    at EventEmitter.emit (events.js:95:17)
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:399:23
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:765:13
    at Callbacks.emit (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:95:3)
    at null.messageHandler (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:243:23)
    at Socket.<anonymous> (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:262:22)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:746:14)
npm ERR! weird error 8
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0

arkag avatar Jan 20 '16 21:01 arkag

hmm, seems like you're running a very old version of npm as well.. let's try upgrading that:

npm install -g npm
rm -rf node_modules
npm cache clean
npm install

also try upgrading node:

npm install -g n
n 0.10.41

hhaidar avatar Jan 20 '16 21:01 hhaidar

Again...


root@testing:~/lets-chat# npm start

> [email protected] prestart /root/lets-chat
> migroose


> [email protected] start /root/lets-chat
> node app.js

TypeError: Object #<Object> has no method 'needsMigration'
    at /root/lets-chat/app.js:269:14
    at open (/root/lets-chat/node_modules/mongoose/lib/connection.js:488:17)
    at NativeConnection.Connection.onOpen (/root/lets-chat/node_modules/mongoose/lib/connection.js:498:5)
    at /root/lets-chat/node_modules/mongoose/lib/connection.js:457:10
    at /root/lets-chat/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:54:5
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/db.js:229:5
    at connectHandler (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/server.js:279:7)
    at g (events.js:180:16)
    at EventEmitter.emit (events.js:95:17)
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:399:23
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:765:13
    at Callbacks.emit (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:95:3)
    at null.messageHandler (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:243:23)
    at Socket.<anonymous> (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:262:22)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:746:14)

/root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/server.js:282
      process.nextTick(function() { throw err; })
                                          ^
TypeError: Object #<Object> has no method 'needsMigration'
    at /root/lets-chat/app.js:269:14
    at open (/root/lets-chat/node_modules/mongoose/lib/connection.js:488:17)
    at NativeConnection.Connection.onOpen (/root/lets-chat/node_modules/mongoose/lib/connection.js:498:5)
    at /root/lets-chat/node_modules/mongoose/lib/connection.js:457:10
    at /root/lets-chat/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:54:5
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/db.js:229:5
    at connectHandler (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/lib/server.js:279:7)
    at g (events.js:180:16)
    at EventEmitter.emit (events.js:95:17)
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:399:23
    at /root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:765:13
    at Callbacks.emit (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:95:3)
    at null.messageHandler (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:243:23)
    at Socket.<anonymous> (/root/lets-chat/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:262:22)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:746:14)
npm ERR! weird error 8
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0

arkag avatar Jan 20 '16 22:01 arkag

@basilosaurus Please verify your version of node/npm:

node --version
nodejs --version
npm --version

and what does this output:

node --eval "console.log(require('./migroose'))"

hhaidar avatar Jan 20 '16 22:01 hhaidar

root@testing:~/lets-chat# node --version
v0.10.25
root@testing:~/lets-chat# nodejs --version
v0.10.25
root@testing:~/lets-chat# npm --version
1.3.10
root@testing:~/lets-chat# node --eval "console.log(require('./migroose'))"
{}
root@testing:~/lets-chat#

arkag avatar Jan 21 '16 13:01 arkag

Try upgrading both node and npm (3+) and see if that works.

hhaidar avatar Jan 22 '16 16:01 hhaidar

How exactly do I do that? Thanks for the help so far.

arkag avatar Jan 22 '16 17:01 arkag

@basilosaurus NodeJS has a pretty good documentation on how get the latest NodeJS packages for your distribution. Let us know if we can help. :)

bascht avatar Jan 22 '16 17:01 bascht

It's been updated.


npm ERR! Linux 3.13.0-68-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/local/bin/npm" "start"
npm ERR! node v5.5.0
npm ERR! npm  v3.5.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node app.js'.
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 lets-chat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node app.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs lets-chat
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls lets-chat
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/lets-chat/npm-debug.log

arkag avatar Jan 22 '16 19:01 arkag

Make sure to reinstall deps:

rm -rf node_modules
npm cache clean
npm install

and what happens if you run this:

node app.js

hhaidar avatar Jan 22 '16 19:01 hhaidar

Same error...

npm ERR! Linux 3.13.0-68-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/local/bin/npm" "start"
npm ERR! node v5.5.0
npm ERR! npm  v3.5.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node app.js'.
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 lets-chat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node app.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs lets-chat
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls lets-chat
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/lets-chat/npm-debug.log
root@testing:~/lets-chat#

arkag avatar Jan 22 '16 20:01 arkag

cat /root/lets-chat/npm-debug.log

hhaidar avatar Jan 22 '16 20:01 hhaidar

root@testing:~/lets-chat# cat /root/lets-chat/npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 verbose lifecycle [email protected]~prestart: unsafe-perm in lifecycle true
7 verbose lifecycle [email protected]~prestart: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/root/lets-chat/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
8 verbose lifecycle [email protected]~prestart: CWD: /root/lets-chat
9 silly lifecycle [email protected]~prestart: Args: [ '-c', 'migroose' ]
10 silly lifecycle [email protected]~prestart: Returned: code: 0  signal: null
11 info lifecycle [email protected]~start: [email protected]
12 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
13 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/root/lets-chat/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
14 verbose lifecycle [email protected]~start: CWD: /root/lets-chat
15 silly lifecycle [email protected]~start: Args: [ '-c', 'node app.js' ]
16 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
17 info lifecycle [email protected]~start: Failed to exec start script
18 verbose stack Error: [email protected] start: `node app.js`
18 verbose stack Exit status 1
18 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:232:16)
18 verbose stack     at emitTwo (events.js:100:13)
18 verbose stack     at EventEmitter.emit (events.js:185:7)
18 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
18 verbose stack     at emitTwo (events.js:100:13)
18 verbose stack     at ChildProcess.emit (events.js:185:7)
18 verbose stack     at maybeClose (internal/child_process.js:821:16)
18 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
19 verbose pkgid [email protected]
20 verbose cwd /root/lets-chat
21 error Linux 3.13.0-68-generic
22 error argv "/usr/bin/nodejs" "/usr/local/bin/npm" "start"
23 error node v5.5.0
24 error npm  v3.5.3
25 error code ELIFECYCLE
26 error [email protected] start: `node app.js`
26 error Exit status 1
27 error Failed at the [email protected] start script 'node app.js'.
27 error Make sure you have the latest version of node.js and npm installed.
27 error If you do, this is most likely a problem with the lets-chat package,
27 error not with npm itself.
27 error Tell the author that this fails on your system:
27 error     node app.js
27 error You can get information on how to open an issue for this project with:
27 error     npm bugs lets-chat
27 error Or if that isn't available, you can get their info via:
27 error     npm owner ls lets-chat
27 error There is likely additional logging output above.
28 verbose exit [ 1, true ]
root@testing:~/lets-chat#

arkag avatar Jan 22 '16 20:01 arkag

But yea.. the only other thing glaring at me is that you're running this as root (which is not recommended at all). There could be an issue with environment variables or something, have you tried running it as a regular user?

hhaidar avatar Jan 22 '16 20:01 hhaidar

This is running in a container and I'm having trouble getting my user working. I'll work on this next week, got other things I need to work on. Thanks for all of your help so far! I'll let you know if it works without root.

arkag avatar Jan 22 '16 21:01 arkag

I got the same error and what I did was "ln -s /usr/bin/nodejs /usr/bin/node" then start the service.

thameerakn avatar Aug 03 '18 08:08 thameerakn