Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is meteor only returning an empty file?
    primarykey
    data
    text
    <p>I'm using Meteor.js for a new project.</p> <p>It was working at first, but now when I run meteor it seems to start fine, but when I go to <code>localhost:3000</code> my browser automatically downloads an empty file.</p> <p>I tried clearing my cache, restarting my computer, reinstalling node and reinstalling meteor. I also tried running the meteor example apps, and creating a new app no matter which one I get the same result of an empty file being downloaded. At wits end, any ideas?</p> <p>I'm on OS X lion using Google Chrome.</p> <p><strong>Edit:</strong></p> <p>So, after messing around some more, I'm able to run the examples in <code>/usr/local/meteor/examples</code> if I use <code>sudo meteor --port &lt;some arbitrary port&gt;</code>.</p> <p>When I try that with my app though, it says it's running but I still get nothing.</p> <p>Headers from <code>curl</code>ing localhost on the example apps give:</p> <pre><code>HTTP/1.1 200 OK content-type: text/html connection: close transfer-encoding: chunked </code></pre> <p>While my headers are:</p> <pre><code>HTTP/1.1 200 OK date: Mon, 11 Jun 2012 00:51:47 GMT cache-control: public, max-age=31536000 last-modified: Sun, 10 Jun 2012 10:36:37 GMT etag: "0-1339324597000" content-type: application/octet-stream accept-ranges: bytes content-length: 0 connection: close </code></pre> <p><strong>Edit2:</strong> It looks like I get a proper error page if I explicitly throw an error. But, if there are no errors then my headers are wrong.</p> <p><strong>Edit3:*</strong> Or possibly it's an error with my environment, example apps no longer run and I get <code>Unexpected mongo exit code 127. Restarting.</code></p> <p><strong>Edit4:*</strong> Okay, so the mongo error was unrelated. I've tracked the problem back to gzippo, specifically if I comment out: <code>app.use(gzippo.staticGzip(path.join(bundle_dir, 'static_cacheable'), {clientMaxAge: 1000 * 60 * 60 * 24 * 365})); </code> in /usr/local/meteor/app/server/server.js</p> <p>and then have a CLEAR cache (start a new private session) it works! if my cache isn't clear, a blank file is still served.</p> <p>So, the static_cacheable directory isn't created which is why gzippo prompts a empty download.</p> <p>I'm not sure whether this should be patched in meteor's server.js or bundler.js ... going to file a bug</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload