Unable to get the shared folder to work in meteor 0.3.7

That's it, I posted this as a problem on the Meteor GitHub page a couple of weeks ago, but did not receive an answer. The problem seems so simple that perhaps no one can believe me.

Following are the steps to reproduce the problem. I created a new meteorite vanilla project called "foo" using:

meteor create foo 

I created the "public" folder in it and copied the picture into it (troll.jpg).

Then I edited foo.html exclusively to display the image. I see with meteor examples that the URL corresponding to the contents in the shared folder is simply /.

 <head> <title>foo</title> </head> <body> <img src="/troll.jpg"> </body> 

I delete foo.js and foo.css which I do not use.

Then I start the meteor and only the broken image is displayed on the page. The web browser console (Chrome 20.0.1132.47 for MacOS) says:

 Resource interpreted as Image but transferred with MIME type text/html: "http://localhost:3000/troll.jpg". innerhtml.js:80 _htmlToFragment innerhtml.js:80 Meteor.ui.render liveui.js:33 (anonymous function) template.foo.js:1 ready startup_client.js:9 

Using Safari, I get the same thing. GitHub meteor examples seem to work without problems. What am I doing wrong? Thanks.

G.

+6
source share
1 answer

I had a similar problem when I thought that it serves for font files as text / html mime-type, but it turned out that the route to my font file was wrong. Fixing the route fixed the problem.

This was confusing because the server should return a 404 error instead of 200 OK, but now it works.

+2
source

Source: https://habr.com/ru/post/919698/


All Articles