Intereting Posts

错误:find无效的caching选项true。 预期的“记忆”

这个错误显示在cmd使用rhc tail socialinteractive我主持这个网站openshfit我使用swig和模块巩固和摆动的模板指导我解决这个错误

Error: Invalid cache option true found. Expected "memory" or { get: function (ke y) { ... }, set: function (key, value) { ... } }. at validateOptions (/var/lib/openshift/5453580c500446bfbc000d3c/app-root/run time/repo/node_modules/swig/lib/swig.js:113:15) at parse (/var/lib/openshift/5453580c500446bfbc000d3c/app-root/runtime/repo/ node_modules/swig/lib/swig.js:339:5) at Object.precompile (/var/lib/openshift/5453580c500446bfbc000d3c/app-root/r untime/repo/node_modules/swig/lib/swig.js:486:23) at Object.compile (/var/lib/openshift/5453580c500446bfbc000d3c/app-root/runt ime/repo/node_modules/swig/lib/swig.js:606:16) at Function.exports.swig.render (/var/lib/openshift/5453580c500446bfbc000d3c /app-root/runtime/repo/node_modules/consolidate/lib/consolidate.js:246:56) at /var/lib/openshift/5453580c500446bfbc000d3c/app-root/runtime/repo/node_mo dules/consolidate/lib/consolidate.js:146:25 at read (/var/lib/openshift/5453580c500446bfbc000d3c/app-root/runtime/repo/n ode_modules/consolidate/lib/consolidate.js:91:22) at /var/lib/openshift/5453580c500446bfbc000d3c/app-root/runtime/repo/node_mo dules/consolidate/lib/consolidate.js:144:9 at readPartials (/var/lib/openshift/5453580c500446bfbc000d3c/app-root/runtim e/repo/node_modules/consolidate/lib/consolidate.js:114:33) at View.engine (/var/lib/openshift/5453580c500446bfbc000d3c/app-root/runtime /repo/node_modules/consolidate/lib/consolidate.js:139:5) GET / 500 4.312 ms - - 

Solutions Collecting From Web of "错误:find无效的caching选项true。 预期的“记忆”"

这是consolidate.js错误,不是OpenShift错误。

它已经在上游解决,请参阅: https : //github.com/tj/consolidate.js/pull/134

  1. 您需要在发布版本大于0.10.0的版本时更新您的consolidate.js npm软件包。

  2. 或者您可以使用以下解决方法(如@truongminh所示 ):

    app.locals.cache =“内存”