tower-archive / tower

UNMAINTAINED - Small components for building apps, manipulating data, and automating a distributed infrastructure.
http://tower.github.io
MIT License
1.79k stars 120 forks source link

Issue Installing Towerjs #319

Closed bendangelo closed 12 years ago

bendangelo commented 12 years ago

Following the instructions for the first time:

npm install tower -g
tower new app

I get an error:

Error: Cannot find module 'ejs'

I fixed it by running

npm install ejs -g

I think this should be mentioned somewhere for beginners.

bendangelo commented 12 years ago

Ok, so i'm following the generator commands:

cd app
tower generate scaffold Post title:string body:text belongsTo:user

I got an issue running tower generate:

Error: Cannot find module 'tower'

Fixed it by running:

npm install tower

Am I doing this right?

bendangelo commented 12 years ago

Looks like I had to install lots of packages to even run: tower server -p 3000

I think these should be added as dependencies or mentioned on the site: socket.io, mongodb, coffeecup, coffee-script and chokidar

Now i'm getting an error: Error: Constant 'App.' wasn't found at _.extend.constant (/home/blah/app/node_modules/tower/lib/tower-support/shared/shared.js:270:15)

I was hoping the installation would go smoother. Great work so far.

lancejpollard commented 12 years ago

What is you operating system, node version, and npm version? It should be working, we're just fine tuning windows installation and installation may have broken elsewhere but should be easy to fix.

edubkendo commented 12 years ago

@bendangelo it looks like when you created your new app, and cd'ed into it, you didn't run "npm install" to install the app's dependencies. This is why you were having to install tower and other things by hand. The ejs thing is a seperate weird issue, you shouldn't have had to install that manually.

edubkendo commented 12 years ago

to clarify, creating a new app should go like this:

tower new myAwesomeApp
cd myAwesomeApp
npm install
cake watch

Then, open a second terminal tab and run your server, run generators, etc. Also, if you run a generator, you may need to re-start the "cake watch" task, though normally it should pick up changes to your app on its own, I'm not sure if it picks up newly generated stuff without being restarted. Pretty sure this info is available in the README

lancejpollard commented 12 years ago

@bendangelo were you able to get past this? going to close the issue if so, let me know. thanks!

bendangelo commented 12 years ago

Those steps worked for me. Except: cake watch

I'm on Ubuntu 12.04 x64. Nodejs 0.8.11. Npm 1.1.62

thehydroimpulse commented 12 years ago

What didn't work with cake watch?

bendangelo commented 12 years ago

Oh sorry. It says cake is currently not installed. I couldn't find anything in npm. What is it?

edubkendo commented 12 years ago

do you have coffeescript installed globally? cake is coffeescript's version of make/rake/jake/etc

bendangelo commented 12 years ago

Ok I ran:

npm install coffee-script -g

and it worked. Thanks.

thehydroimpulse commented 12 years ago

Can you close the issue?