Friday, 13 March 2015

Keystonejs Crash when "+ New Model" link clicked (Heroku)



  •  TypeError: /app/node_modules/keystone/lib/core/../../templates/views/list.jade:24
  •  22| script(src='/keystone/js/lib/browserified/querystring.js')
  • 23| script(src='/keystone/js/lib/browserified/queryfilter.js')
  • 24| script.
  • 25| Keystone.list = { path: "#{list.path}", label: "#{list.label}", singular: "#{list.singular}", plural: "#{list.plural}", cols: !{JSON.stringify(colPaths)}, perPage: !{ Number(list.perPage) || 50 } };
  • 26| Keystone.wysiwyg = { options: !{JSON.stringify(wysiwygOptions)} };
  • 27| Keystone.items = !{ JSON.stringify(items) };
  • Cannot convert object to primitive value
  • at String (native)
  • at Object.escape (/app/node_modules/keystone/node_modules/jade/lib/runtime.js:183:16)
  • at eval (<anonymous>:5140:40)
  • at eval (<anonymous>:5199:22)
  • at res (/app/node_modules/keystone/node_modules/jade/lib/index.js:191:38)
  • at [object Object].render (/app/node_modules/keystone/lib/core/render.js:118:13)
  • at /app/node_modules/keystone/routes/views/list.js:117:14
  • at /app/node_modules/async/lib/async.js:157:25
  • at password.Field.compile (/app/node_modules/keystone/lib/field.js:298:10)
  • at compileFields (/app/node_modules/keystone/routes/views/list.js:113:56)
  • at=error code=H13 desc="Connection closed without response" method=GET path="/keystone/users?new&_csrf=Tu3ZatO8QK1L5hdQ0mjWdm8/nI4ipCiIX5JHE=" connect=1ms service=1266ms status=503 bytes=0
  • at iterate (/app/node_modules/async/lib/async.js:149:13)
  • at /app/node_modules/async/lib/async.js:160:25
  • at email.Field.compile (/app/node_modules/keystone/lib/field.js:298:10)
  • at compileFields (/app/node_modules/keystone/routes/views/list.js:113:56)
  • at iterate (/app/node_modules/async/lib/async.js:149:13)
  • at Object.async.eachSeries (/app/node_modules/async/lib/async.js:165:9)
  • at /app/node_modules/keystone/routes/views/list.js:115:10
  • at Promise.<anonymous> (/app/node_modules/keystone/lib/list.js:1187:5)
  • at Promise.<anonymous> (/app/node_modules/keystone/node_modules/mongoose/node_modules/mpromise/lib/promise.js:177:8)
  • at Promise.emit (events.js:107:17)
  • at Promise.emit (/app/node_modules/keystone/node_modules/mongoose/node_modules/mpromise/lib/promise.js:84:38)
  • at Promise.fulfill (/app/node_modules/keystone/node_modules/mongoose/node_modules/mpromise/lib/promise.js:97:20)
  • at Promise.resolve (/app/node_modules/keystone/node_modules/mongoose/lib/promise.js:114:23)
  • at Promise.<anonymous> (/app/node_modules/keystone/node_modules/mongoose/node_modules/mpromise/lib/promise.js:177:8)
  • at Promise.emit (events.js:107:17)





Recently my keystonejs website on heroku got this error, when I click the "+new model xxx" button.





People also discuss this issue on keystone@github:

https://github.com/keystonejs/keystone/issues/1133

I found the issue is my keystonejs application on heroku currently uses "v0.12.0".

The solution of fix this issue is fixing node version to v0.10.35 by changing package.json file:








I think, this issue caused by heroku upgrading!!!!! that always happen!!!!!!










No comments:

Post a comment