Open cpury opened 6 years ago
I have the similar issue. But my app crash when i`m trying ti pass any FlowRouter params, like 'id'
FlowRouter.route('/editproduct/:id', { name: 'editProduct', action: function(params) { BlazeLayout.render('pageContent', {wrapper: 'editProduct' }); } });
without FlowRouter param '/:id' my public files loads correctly in template Problem always comes up on the initial server start Meteor -1.8; FlowRouter - 2.1
Solved. In my case the error was in relative url of static files (css/bootstrap.min.css) loaded as (/editproduct/css/bootstrap.min.css) - that was wrong. Static files should be imported by absolute url like this:
<link href="/css/bootstrap.min.css" rel="stylesheet">
(Crosspost from https://forums.meteor.com/t/flow-router-public-files-dont-get-served-until-dev-server-restarts-for-the-first-time/39763)
I have a simple app that uses Flow-Router. In my public directory, there are some files that I'd like to be served. This seems to work always when running meteor without flow router. However, when I start the dev server with my route definitions, the static files are not served at all and result in a 404 no matter how many times I clear the cache and refresh. I have to edit some file to trigger a server restart before it works as expected.
Is there something I can do to debug what's going on? Serving public files is supposed to work out of the box with flow router, right?
Here's my routes.js:
Other info: The routes are defined similarly to the newest TODO example in
/imports/startup/client/routes.js
and get imported early on the client-side.I've used Meteor 1.5 but just upgraded to 1.6-rc.5 and the issue still persists.