You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a try/catch around this shows that the problem is that the chunk being passed through is a js object rather than a string. here is the output from each chunk:
chunk 0:
<html><body>
chunk 1:
{ pageName: 'Example'
, content: '<p>asdf asdf asdf</p>'
, location: undefined
}
{ message: 'first argument must be a string, Array, or Buffer'
, stack: [Getter/Setter]
}
I haven't been able to get further down the stack from this but it looks like the page responses are not being templated properly
for each response node is failing at http://github.com/kriszyp/jsgi-node/zipball/v0.2.1!/lib/jsgi-node.js:165:18
forEachResult = data.body.forEach( function( chunk ) {
response.write( chunk, data.body.encoding || "utf8" );
});
Adding a try/catch around this shows that the problem is that the chunk being passed through is a js object rather than a string. here is the output from each chunk:
chunk 0:
<html><body>
chunk 1:
{ pageName: 'Example'
, content: '<p>asdf asdf asdf</p>'
, location: undefined
}
{ message: 'first argument must be a string, Array, or Buffer'
, stack: [Getter/Setter]
}
chunk 2:
<body></html>
TypeError: first argument must be a string, Array, or Buffer
at ServerResponse.write (http:488:11)
at jar:http://github.com/kriszyp/jsgi-node/zipball/v0.2.1!/lib/jsgi-node.js:165:18
at Object.forEach (eval at (jar:http://github.com/dmachi/templify/zipball/master!/lib/template.js:32:12))
at jar:http://github.com/kriszyp/pintura/zipball/v0.2.2!/lib/media/html.js:66:24
at jar:http://github.com/kriszyp/promised-io/zipball/v0.2.1!/lib/promise.js:320:10
at jar:http://github.com/kriszyp/pintura/zipball/v0.2.2!/lib/media/html.js:65:13
at notify (jar:http://github.com/kriszyp/promised-io/zipball/v0.2.1!/lib/promise.js:162:22)
at [object Object].then (jar:http://github.com/kriszyp/promised-io/zipball/v0.2.1!/lib/promise.js:215:4)
at jar:http://github.com/kriszyp/promised-io/zipball/v0.2.1!/lib/promise.js:314:20
at Object.forEach (jar:http://github.com/kriszyp/pintura/zipball/v0.2.2!/lib/media/html.js:64:12)
The text was updated successfully, but these errors were encountered: