我正试着在windows上推广一个简单的策略,但我正在做某事。不对。
首先,我使用npm安装couchapp:
D:\test>npm -g install couchapp
D:\test>npm install couchapp我知道有两种不同的couchapp,但我谨慎地使用了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.现在,我创建了一个couchapp:
越野车锅炉
这将创建一个app.js和一个attachments文件夹,其中包含一个简单的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)我做错了什么?请帮帮我
发布于 2012-06-15 02:12:10
我不知道这个问题的答案,但我也许可以帮助你调试这个问题。如果您转到这个line并对path.join(process.cwd(), path.normalize(pathname))的结果执行console.log,那么您可以找到couchapp试图获取您的app.js文件的位置。
另外,如果可能的话,你应该去看看kanso.js。上一次我创建couchapp时(六个月前),kanso.js比node.couchapp.js好多了。
https://stackoverflow.com/questions/11038180
复制相似问题