ssrwpo / ssr

SSR - Router with SSR for Node & Meteor
https://ssrwpo.github.io/ssr/
MIT License
93 stars 16 forks source link

Router returning a blank page with Meteor 1.6.1.1 #88

Open nilesh-parab opened 6 years ago

nilesh-parab commented 6 years ago

Hi, We recently updated from Meteor 1.5.1 to 1.6.1.1. We encountered the same problem raised here. The problem was when Meteor updated their code for WebAppInternals.getBoilerplate to return a stream as opposed to string before.

So we temporarily fixed it by converting the stream to string & passing the string to html minifier used as below:

const meteorHtml = WebAppInternals.getBoilerplate(stepResults.req, WebApp.defaultArch); let actualHTML = ''; meteorHtml.stream.on('data', (chunk) => { actualHTML += chunk.toString(); }); meteorHtml.stream.on('end', () => { stepResults.html = htmlMinifier.minify(actualHTML, { removeScriptTypeAttributes: true, removeStyleLinkTypeAttributes: true, collapseWhitespace: true, }); But after doing this, when we hit the application we get a blank page with console printed that we had put after the createRouter call finishes.

Can someone please help understanding what might be the cause of it or some pointers to debug the issue?