2012-06-14 3 views
0

Windows에서 간단한 couchapp을 푸시하려고합니다.하지만 sth입니다. 잘못된.node.couchapp.js로 couchapp을 푸시 할 수 없습니다.

우선 설치하고있어 couchapp 사용하여 NPM :

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

나는 두 diffrent couchapps이 있다는 것을 알고 있지만 나는 shurely 노드 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. 

을 couchapp :이 app.js 및 첨부 생성

couchapp 보일러 s 폴더에 간단한 couchapp이 들어 있습니다. 지금은 CouchDB를에 밀어하려면 다음 오류

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

이 결과 :

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) 

내가 잘못 dooing하고 무엇? 제발 도와주세요

답변

1

이 답변을 모르겠지만 어쩌면 당신이 문제를 디버그하는 데 도움이 될 수 있습니다. 이 line과 console.log에 가서 path.join(process.cwd(), path.normalize(pathname))의 결과를 얻으면 couchapp이 app.js 파일을 가져 오는 위치를 알 수 있습니다.

또한 가능한 경우 kanso.js를 확인해야합니다. 마지막으로 couchapp (6 개월 전)를 만들었 으면 kanso.js가 node.couchapp.js보다 훨씬 낫습니다.

+0

힌트를 가져 주셔서 감사합니다. 내가 debuged했습니다 : 문제는 npm regestry에서 패키지가 오래된 것입니다 (https://github.com/mikeal/node.couchapp.js/pull/41 참조). 지금 github에서 버전을 사용하고 있습니다. – Ingemar

+0

kanso 솔기가 좋은 옵션이 될 것입니다 ... 나는 반드시 뛰어 들어야 할 것입니다. – Ingemar

관련 문제