Open jcc2303 opened 9 years ago
I don't use Koa, but maybe try switching the following lines:
Bad:
response.body = output;
response.type = 'text/html';
Good:
response.type = 'text/html';
response.body = output;
I think when you set the body
property on the response
object it is writing the HTTP body. After you write the HTTP body you can't set any headers. When the response.type = 'text/html';
line runs it is attempting to set the Content-Type
header and failing because the body has already been sent due to the response.body = output;
line.
Hi @jcc2303, did you have a chance to try my suggestion above?
@patrick-steele-idem I tried this in my app. The problem still remain:
P.S. I have two .marko-files with <lasso-page package-path="./browser.json" />
(it's two different browser.json of course). But it's absolutly normal - to have in each .marko-file own .json'ed package with bundled JS'es included).
@patrick-steele-idem Can you help me?
@aversilov Do you have separate names for each lasso-page definition?
Ex: <lasso-page name="unique-name" package-path="./browser.json">
Additionally, could you post more on the specific of the unhandled rejection?
After giving up trying to use
browser.json
for lasso, we have been trying to use the lasso API directly to inject our dependencies...Our marko render function
in the terminal