0

Background information

I'm trying my hand out at express. I've been following the getting started guide found here: http://expressjs.com/starter/generator.html

Problem

I have nodejs installed have been creating on off files to check out how it works. But here's what happened with my attempt to create an application using the generator:

admin@devbox:~/Documents/nodejs/node_express_tests$ sudo npm install express-generator -g
/usr/local/bin/express -> /usr/local/lib/node_modules/express-generator/bin/express
express-generator@4.13.1 /usr/local/lib/node_modules/express-generator
├── sorted-object@1.0.0
├── commander@2.7.1 (graceful-readlink@1.0.1)
└── mkdirp@0.5.1 (minimist@0.0.8)
admin@devbox:~/Documents/nodejs/node_express_tests$ express myapp
admin@devbox:~/Documents/nodejs/node_express_tests$ ls
admin@devbox:~/Documents/nodejs/node_express_tests$ sudo express myapp
admin@devbox:~/Documents/nodejs/node_express_tests$ ls
admin@devbox:~/Documents/nodejs/node_express_tests$ ls -lah
total 8.0K
drwxr-xr-x 2 root root 4.0K Jul 17 08:22 .
drwxr-xr-x 3 root root 4.0K Jul 17 08:22 ..

If I understand correctly, I should have a directory structure that includes an app.js file as well as various directories. I'm not sure what I've done incorrectly. I'm currently checking for some logs and also checking their documentation. But any suggestions would be welcome.

Thanks.

EDIT 1

admin@devbox:~/Documents/nodejs/node_express+tests$ nodejs -v
v0.10.25
admin@devbox:~/Documents/nodejs/node_express_tests$ node -v
admin@devbox:~/Documents/nodejs/node_express tests$ npm -v
1.4.21
admin@devbox:~/Documents/nodejs/nimble$ 
dot
  • 14,928
  • 41
  • 110
  • 218
  • try `/usr/local/bin/express myapp`. Also what's the output of `node -v` and `npm -v`? – Florian Wendelborn Jul 17 '15 at 13:47
  • this is interesting location. try in your home dir. – Andrey Jul 17 '15 at 14:12
  • @Dodekeract, trying to launch express by prefixing the directory didn't do anything. No errors, and no results. Pls check out EDIT 1 in my post – dot Jul 17 '15 at 15:54
  • @Andrey... i tried from my home directory, but it's the same thing. No results. I just get back my prompt. No errors, no output – dot Jul 17 '15 at 15:55
  • @dot I would suggest to try to debug express, since it is opensource. It is last resort. – Andrey Jul 17 '15 at 17:16
  • @Andrey... hmm... sounds daunting. But I will give it a try. Thanks. – dot Jul 17 '15 at 17:30
  • 2
    I think the issue is that you initially installed `node`, which on Ubuntu/Debian is some sort of HAM radio app. Node.js is called `nodejs`, but any external scripts will assume it's called `node` and therefore won't work properly. Uninstall `node` and check out [this posting](http://stackoverflow.com/questions/18130164/nodejs-vs-node-on-ubuntu-12-04). – robertklep Jul 17 '15 at 18:35

0 Answers0