1

この投稿に従って、ofstudio によって投稿されたカスタム ヘルパーを作成しました

https://stackoverflow.com/a/28147370/5335127

ハンドルバー テンプレートで {{#by_tag}} を 2 回使用すると、次のエラーが発生します

 ERROR: Can't set headers after they are sent.
 registerAsyncThemeHelper: ghost_head

 Error: Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:335:11)
    at ServerResponse.header (C:\Ghost\ghost-0.7.1\node_modules\express\lib\response.js:700:10)
    at ServerResponse.send (C:\Ghost\ghost-0.7.1\node_modules\express\lib\response.js:154:12)
    at fn (C:\Ghost\ghost-0.7.1\node_modules\express\lib\response.js:934:10)
    at _stackRenderer (C:\Ghost\ghost-0.7.1\node_modules\express-hbs\lib\hbs.js:524:9)
    at Waiter.callback (C:\Ghost\ghost-0.7.1\node_modules\express-hbs\lib\hbs.js:501:7)
    at Waiter.resolve (C:\Ghost\ghost-0.7.1\node_modules\express-hbs\lib\async.js:43:12)
    at C:\Ghost\ghost-0.7.1\node_modules\express-hbs\lib\async.js:84:15
    at C:\Ghost\ghost-0.7.1\core\server\helpers\index.js:64:13
    at tryCatcher (C:\Ghost\ghost-0.7.1\node_modules\bluebird\js\main\util.js:24:31)
    at Promise._settlePromiseFromHandler (C:\Ghost\ghost-0.7.1\node_modules\bluebird\js\main\promise.js:454:31)
    at Promise._settlePromiseAt (C:\Ghost\ghost-0.7.1\node_modules\bluebird\js\main\promise.js:530:18)
    at Promise._settlePromises (C:\Ghost\ghost-0.7.1\node_modules\bluebird\js\main\promise.js:646:14)
    at Async._drainQueue (C:\Ghost\ghost-0.7.1\node_modules\bluebird\js\main\async.js:177:16)
    at Async._drainQueues (C:\Ghost\ghost-0.7.1\node_modules\bluebird\js\main\async.js:187:10)
    at Immediate.Async.drainQueues [as _onImmediate] (C:\Ghost\ghost-0.7.1\node_modules\bluebird\js\main\async.js:15:14)
    at processImmediate [as _immediateCallback] (timers.js:358:17)

Unhandled rejection Error: Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:335:11)
    at ServerResponse.header (C:\Ghost\ghost-0.7.1\node_modules\express\lib\response.js:700:10)
    at ServerResponse.send (C:\Ghost\ghost-0.7.1\node_modules\express\lib\response.js:154:12)
    at fn (C:\Ghost\ghost-0.7.1\node_modules\express\lib\response.js:934:10)
    at _stackRenderer (C:\Ghost\ghost-0.7.1\node_modules\express-hbs\lib\hbs.js:524:9)
    at Waiter.callback (C:\Ghost\ghost-0.7.1\node_modules\express-hbs\lib\hbs.js:501:7)
    at Waiter.resolve (C:\Ghost\ghost-0.7.1\node_modules\express-hbs\lib\async.js:43:12)
    at C:\Ghost\ghost-0.7.1\node_modules\express-hbs\lib\async.js:84:15
    at C:\Ghost\ghost-0.7.1\core\server\helpers\index.js:64:13
    at tryCatcher (C:\Ghost\ghost-0.7.1\node_modules\bluebird\js\main\util.js:24:31)
    at Promise._settlePromiseFromHandler (C:\Ghost\ghost-0.7.1\node_modules\bluebird\js\main\promise.js:454:31)
    at Promise._settlePromiseAt (C:\Ghost\ghost-0.7.1\node_modules\bluebird\js\main\promise.js:530:18)
    at Promise._settlePromises (C:\Ghost\ghost-0.7.1\node_modules\bluebird\js\main\promise.js:646:14)
    at Async._drainQueue (C:\Ghost\ghost-0.7.1\node_modules\bluebird\js\main\async.js:177:16)
    at Async._drainQueues (C:\Ghost\ghost-0.7.1\node_modules\bluebird\js\main\async.js:187:10)
    at Immediate.Async.drainQueues [as _onImmediate] (C:\Ghost\ghost-0.7.1\node_modules\bluebird\js\main\async.js:15:14)
    at processImmediate [as _immediateCallback] (timers.js:358:17)

助けてください。

エラーは次の投稿に関連していますが、ゴースト Express-hbs インスタンスでは registerAsyncHelper の奇妙なハッシュ

4

0 に答える 0