정적 웹 사이트에서 사용할 수 있도록 MongoDB 문서를 DocPad 데이터베이스로 가져 오기 위해 DocPad 플러그인을 작성하려고합니다. 소스 코드가 https://github.com/nfriedly/docpad-plugin-mongodb에 있고 그것이 내가 cake test
를 실행하면,이 출력을 얻을 https://github.com/docpad/docpad-plugin-tumblrDocPad 플러그인 : 테스트시 홀수 오류가 발생하고 프로젝트에 포함될 때 중단됩니다.
을 기반으로 : 내 프로젝트에 모듈을 포함 할 때
cake compile
cake install
npm install (for app)
npm install (for test)
npm install (for docpad tests)
coffee compile
npm test
> [email protected] test c:\Users\IBM_ADMIN\docpad-plugin-mongodb
> npm run prepare_test_db && node ./out/mongodb.test.js
> [email protected] prepare_test_db c:\Users\IBM_ADMIN\docpad-plugin-mongodb
> mongo test/prepare_database.mongo.js
MongoDB shell version: 2.6.5
connecting to: test
connecting to: docpad_plugin_mongodb_test
mongodb
mongodb > create
notice: If everyone who saw this message donated $1/week, maintaining DocPad would become sustainable: http://docpad.org/donate
error: An error occured:
Error: Didn't place the skeleton as the desired structure already exists
at c:\Users\IBM_ADMIN\docpad-plugin-mongodb\node_modules\docpad\out\lib\docpad.js:4107:17
at Object.cb [as oncomplete] (fs.js:168:19)
error: To report the above error, follow the guide at: http://docpad.org/bug-report
mongodb > create OK
mongodb > load plugin mongodb
mongodb > load plugin mongodb OK
mongodb > generate
mongodb > generate > action
warning: You have multiple files being written to c:\Users\IBM_ADMIN\docpad-plugin-mongodb\test\out\testData\1.json, they are:
- testData/1.json:c7
- testData/1.json:c5
Rename one of them to avoid an over-write
FAILURE: 2/3 tests ran successfully; 0 failed, 1 incomplete, 0 errors
npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0
c:\Users\IBM_ADMIN\docpad-plugin-mongodb\Cakefile:99
throw err;
^
Error: Process exited with error status code
at ChildProcess.<anonymous> (c:\Users\IBM_ADMIN\docpad-plugin-mongodb\Cakefile:88:15)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
과, 그냥이 후 중단 :
$ docpad run
info: Welcome to DocPad v6.69.1 (local installation: c:\Users\IBM_ADMIN\watson-developer-cloud\node_modules\docpad
notice: If everyone who saw this message donated $1/week, maintaining DocPad would become sustainable: http://docp
info: Contribute: http://docpad.org/docs/contribute
info: Plugins: eco, mongodb
info: Environment: development
info: DocPad listening to http://0.0.0.0:9778/ on directory c:\Users\IBM_ADMIN\watson-developer-cloud\out
(I localhost를 방문한다면 : 9778을, 그냥 중단하고, 페이지로드 결코)
그것은 단지 창피 것 같아를 첫 번째 단계가 완료된 후 플러그인에서 로그를 재생하므로 어떤 작업을했는지 보려면 throw
문을 추가하기 시작했습니다. 그것은 몽고에서 성공적으로 물건을 가져 오는 것, 그리고 그것은 문서를 만듭니다, 그러나 플러그인이 document.action 'load', (err) ->
을 호출 할 때, 그 콜백은 결코 해고되지 않습니다.
누구나 내가 엉망이되어서 일을 원활하게 진행하는 방법에 대한 지침을 제공 할 수 있습니까?