0

I'm trying to push a simple couchapp on windows, but I'm dooing sth. wrong.

First I'm installing couchapp using npm:

D:\test>npm -g install couchapp
D:\test>npm install couchapp

I know that there are two diffrent couchapps, but I'm shurely using the node couchapp:

D:\test>couchapp
The "sys" module is now called "util". It should have a similar interface.
couchapp -- utility for creating couchapps

Usage:
  couchapp <command> app.js http://localhost:5984/dbname

Commands:
  push   : Push app once to server.
  sync   : Push app then watch local files for changes.
  boiler : Create a boiler project.

Now I create a couchapp:

couchapp boiler

This creates a app.js and a attachments folder containing a simple couchapp. Now i want to push it to the couchdb:

couchapp push app.js http://localhost:5984/test

This results in the following 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:332:11)
    at Function._load (module.js:279:25)
    at Module.require (module.js:354:17)
    at require (module.js:370:17)
    at Object.<anonymous> (D:\test\node_modules\couchapp\bin.js:78:24)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
    at Array.0 (module.js:479:10)

What am I dooing wrong? Please help me

Ingemar
  • 1,638
  • 2
  • 12
  • 15

1 Answers1

1

I don't know the answer to this but I can maybe help you debug the problem. If you go to this line and console.log the result of path.join(process.cwd(), path.normalize(pathname)) then you can find out where couchapp is trying to grab your app.js file.

Also if possible you should check out kanso.js. Last time I created a couchapp (six months ago) kanso.js was a lot better than node.couchapp.js.

Pickels
  • 33,902
  • 26
  • 118
  • 178
  • Thank you for the hint. I've debuged it: The problem was that the package at npm regestry is out of date (see https://github.com/mikeal/node.couchapp.js/pull/41). I'm using now the version from github. – Ingemar Jun 15 '12 at 09:01