Beginning to answer my own question. The app.js file in the sofa app doesn't have the same structure as those created by couchapp boiler.
Is the sofa app out-of-date to be learning couchdb with? In which case should I be bothering with the definitive guide? Jason On 8 December 2011 15:16, Jason Woodruff <[email protected]>wrote: > Hi > > I'm experiencing some strange behaviour with couchapp on node.js. > > For example, I receive a 'could not create' message, even though the app > is created? > > $ couchapp boiler test3 > Could not create /home/jason/CouchApps/test3 > ........................??????? > > And, so as to prove it, I can then push it to the db > > $ couchapp push app.js http://127.0.0.1:5984/test3 > Preparing. > Serializing. > PUT http://127.0.0.1:5984/test3/_design/app > Finished push. 1-72b18a3b961a0f16fa9f988cb9c28da2 > > I've cloned Chris Anderson's 'sofa' blog app. > > git clone git://github.com/jchris/sofa.git > > But despite every which way I can think of I cannot get it to push to the > db. > > I'm using > > couchapp push app.js http://127.0.0.1:5984/[new empty db] > > I've called this from the sofa, _attachment and script directories. > Nothing works. Running from the /script directory this is the error: > > node.js:201 > throw e; // process.nextTick error, or 'error' event on first tick > ^ > ReferenceError: $ is not defined > at Object.<anonymous> > (/home/jason/CouchApps/sofa/_attachments/script/app.js:1:63) > at Module._compile (module.js:432:26) > at Object..js (module.js:450:10) > at Module.load (module.js:351:31) > at Function._load (module.js:310:12) > at Module.require (module.js:357:17) > at require (module.js:368:17) > at Object.<anonymous> > (/usr/local/lib/node_modules/couchapp/bin.js:78:24) > at Module._compile (module.js:432:26) > at Object..js (module.js:450:10) > > Pulling sofa into /usr/local and going through the same process of running > the command from the /script directory I get a different error. > > node.js:201 > throw e; // process.nextTick error, or 'error' event on first tick > ^ > Error: Cannot find module 'app.js' > at Function._resolveFilename (module.js:334:11) > at Function._load (module.js:279:25) > at Module.require (module.js:357:17) > at require (module.js:368:17) > at Object.<anonymous> > (/usr/local/lib/node_modules/couchapp/bin.js:78:24) > at Module._compile (module.js:432:26) > at Object..js (module.js:450:10) > at Module.load (module.js:351:31) > at Function._load (module.js:310:12) > at Array.0 (module.js:470:10) > > > Is this all a bit buggy, or am I making a horlicks of things? > > Thanks > > Jason > > > > >
