sdelements / lets-chat

Self-hosted chat app for small teams
http://sdelements.github.io/lets-chat
MIT License
9.76k stars 1.58k forks source link

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

Open arkag opened 8 years ago

arkag commented 8 years ago

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

> lets-chat@0.4.5 prestart /root/lets-chat
> migroose

> lets-chat@0.4.5 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?

bascht commented 8 years ago

@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. :)

hhaidar commented 8 years ago

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.

arkag commented 8 years ago

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 commented 8 years ago

New error


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

> lets-chat@0.4.5 prestart /root/lets-chat
> migroose

> lets-chat@0.4.5 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
hhaidar commented 8 years ago

What's your node version?

arkag commented 8 years ago
nodejs -v
v0.10.25
hhaidar commented 8 years ago

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

arkag commented 8 years ago

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
hhaidar commented 8 years ago

@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
arkag commented 8 years ago

I don't think I ever named my database.

hhaidar commented 8 years ago

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

mongo letschat --eval 'db.migrootions.drop()'
arkag commented 8 years ago
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!     <npm-@googlegroups.com>

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
hhaidar commented 8 years ago

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

arkag commented 8 years ago

Sorry about that. Seems to be the same error.


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

> lets-chat@0.4.5 prestart /root/lets-chat
> migroose

> lets-chat@0.4.5 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
hhaidar commented 8 years ago

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
arkag commented 8 years ago

Again...


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

> lets-chat@0.4.5 prestart /root/lets-chat
> migroose

> lets-chat@0.4.5 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
hhaidar commented 8 years ago

@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'))"
arkag commented 8 years ago
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#
hhaidar commented 8 years ago

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

arkag commented 8 years ago

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

bascht commented 8 years ago

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

arkag commented 8 years ago

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! lets-chat@0.4.5 start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lets-chat@0.4.5 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
hhaidar commented 8 years ago

Make sure to reinstall deps:

rm -rf node_modules
npm cache clean
npm install

and what happens if you run this:

node app.js
arkag commented 8 years ago

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! lets-chat@0.4.5 start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lets-chat@0.4.5 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#
hhaidar commented 8 years ago
cat /root/lets-chat/npm-debug.log
arkag commented 8 years ago
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 npm@3.5.3
3 info using node@v5.5.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle lets-chat@0.4.5~prestart: lets-chat@0.4.5
6 verbose lifecycle lets-chat@0.4.5~prestart: unsafe-perm in lifecycle true
7 verbose lifecycle lets-chat@0.4.5~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 lets-chat@0.4.5~prestart: CWD: /root/lets-chat
9 silly lifecycle lets-chat@0.4.5~prestart: Args: [ '-c', 'migroose' ]
10 silly lifecycle lets-chat@0.4.5~prestart: Returned: code: 0  signal: null
11 info lifecycle lets-chat@0.4.5~start: lets-chat@0.4.5
12 verbose lifecycle lets-chat@0.4.5~start: unsafe-perm in lifecycle true
13 verbose lifecycle lets-chat@0.4.5~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 lets-chat@0.4.5~start: CWD: /root/lets-chat
15 silly lifecycle lets-chat@0.4.5~start: Args: [ '-c', 'node app.js' ]
16 silly lifecycle lets-chat@0.4.5~start: Returned: code: 1  signal: null
17 info lifecycle lets-chat@0.4.5~start: Failed to exec start script
18 verbose stack Error: lets-chat@0.4.5 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 lets-chat@0.4.5
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 lets-chat@0.4.5 start: `node app.js`
26 error Exit status 1
27 error Failed at the lets-chat@0.4.5 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#
hhaidar commented 8 years ago

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?

arkag commented 8 years ago

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.

thameerakn commented 5 years ago

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