nitrotasks / nitro

The beautiful way to get things done.
https://nitrotasks.com
GNU Affero General Public License v3.0
518 stars 66 forks source link

No application.js #231

Closed Arqu closed 11 years ago

Arqu commented 11 years ago

I've installed node.js, followed the instructions for installation, got ruby and installed sass for the css but when run cake -w server and go to localhost:9294 all I get is a loading screen that sits there forever, when I open my console in Chrome I get the error that application.js is missing. In my public folder there is no application.js to be found. cake minify or cake build don't generate it.

While running the server I get the following on the console:

Server started on 9294
Error: spawn Unknown system errno 193
Error: spawn ENOENT

And while running cake minify I get:

Error: spawn ENOENT

While cake build gives me:

Error: spawn Unknown system errno 193
Error: spawn ENOENT

Any help/guidelines or is something wrong?

stayradiated commented 11 years ago

Have you checked the dependencies are installed?

cd ~/Projects/Nitro
npm install
Arqu commented 11 years ago

Yes, I have, and after re-running it again I get npm WARN package.json app@0.0.1 No repository field.. On the other hand, I've found this which probably has something to do with the whole thing, but I can't really wrap my head around it quite yet, as I'm new to coffee-script and the alike.

stayradiated commented 11 years ago

Which OS are you using? It works fine for me on OS X and Linux, but I haven't tested it on Windows.


Instead of using cake you could try running the build commands manually.

To create application.js:

cd ~/Projects/Nitro
./node_modules/browserify/bin/cmd.js -t ./node_modules/caching-coffeeify/index.js app/init.coffee -o public/application.js

To create application.css:

cd ~/Projects/Nitro
sass css/index.scss:public/application.css
Arqu commented 11 years ago

Yes, I'm on Windows currently, and it's next to impossible to execute what you wanted, I used full windows paths and got dozens of errors, invalid character at the beginning of the file (#!/usr/bin/env node) then it starts reporting errors that there are returns outside of a function and so on. Anyways, I'll probably turn to Linux tomorrow and use that for development and then just deploy the finished version on Windows.

I did manage to generate the CSS though, it was easy with sass ruby gem.

BTW looking at the Cakefile, you're using *NIX paths, that's probably one reason why it doesn't work under windows.

stayradiated commented 11 years ago

Ok. Another thing to try is to install browserify globally using NPM. I haven't tested this but I think it would work.

npm install -g browserify coffeeify
cd ~/Projects/Nitro
browserify -t coffeeify app/init.coffee -o public/application.js

A potential fix for the Cakefile is to rewrite it using the browserify JS methods, instead of running it through the command line. This would hopefully be platform independent.

Arqu commented 11 years ago

Thanks, that worked. Just after installing the modules globally the command is browserify -t caching-coffeeify app/init.coffee -o public/application.js and then it works like a charm.

stayradiated commented 11 years ago

I've updated the README with commands for building on Windows.