kadirahq / flow-router

Carefully Designed Client Side Router for Meteor
MIT License
1.09k stars 192 forks source link

"There is no route for the path: /" in production bundling #692

Open grinono opened 8 years ago

grinono commented 8 years ago

when i'm building for production flowrouter gives a "There is no route for the path: /" In development mode all is working as expected.

running:

currently testing the bug with;

meteor run --production --settings settings-production.json

Try to solve it with; 1) change the routes.js file location to /import/clients/routes.js 2) change between mup/mupx and new mup deployment.. 3) change to flowrouter ServerSideRendering 4) check for any Ready()

If anyone found a solution for the "There is no route for the path: /" in production bundling. That would be great.

SPodjasek commented 8 years ago

Related to #608

saulflores95 commented 8 years ago

I have the same issue, my stack consists of: 1.Meteor 1.4.2 2.Deployment with kadirahq/meteor-up - (https://github.com/kadirahq/meteor-up) 3.ReactJS 4.FlowRouter (kadira:flow-router)

It works great if i run it locally, but when It successfully deploy to Digital Ocean I get a blank screen with a console error "There is no route for the path: /"

grinono commented 8 years ago

The solution for me was to start using react router. Its a drop in replacement for flowrouter. As fast, as easy but more support and better documentation.

saulflores95 commented 8 years ago

Hey @grinono thank you for responding, I was able to get it working. I had materialize meteor packet and mui design packet (this one was installed via npm) that I removed. After i did a clean cache of my meteor npm_modules folder. I reinstalled all my npm packets with --save(Except the two that I previously removed). When I uploaded the app to the server everything was working.

Hope this helps someone.

newdayrising commented 7 years ago

[edit] I downgraded Bootstrap to the latest v3 and the error was resolved. I believe this is due to an error (described here: https://github.com/twbs/bootstrap/issues/18732) that is thrown in the console when using Bootstrap 4 - "Bootstrap tooltips require Tether." How this affects Flow Router is beyond me, as it seems like a soft error.

Not sure if this will help anyone, but my app started working correctly after I removed Bootstrap from a /main/client/lib/bootstrap/ folder. Somehow it was interfering with the normal operation of Flow Router.

markshust commented 7 years ago

I had the same error after a major refactor, and thought FlowRouter was to blame. The internals of FlowRouter are very light though so figured something else was causing it.

I wound up opening Safari in mobile debugging mode to see if there were any additional errors thrown. I was getting a InAppPurchase is not defined. This is an object I was using from a cordova plugin. It turns out after the refactor using imports, the app was loading much faster (before the InAppPurchase object was available to Cordova). Changing all references from InAppPurchase to global.InAppPurchase resolved my issue. Hope this helps someone else.

dmattbergstrom commented 6 years ago

Hi!

I didn't find the solution for this problem by anything here, but after 8 hours of hacking, i solved it.

  1. Some packages didn't work in production for me, in Meteor 1.8. Check all your non-core packages and try to remove them one by one and see if that fixes the issue.

I removed the following problematic packages: aldeed:autoform gwendall:auth-client-callbacks dsyko-jquery-ui-touch

  1. Useraccounts was not included on both server and client. The page using that package was included in my routes.js file, and therefore mucked up all my routes, resulting in this nasty bug.

My tip for anyone who needs to figure out their own way of solving this bug:

  1. Start commenting out packages in .meteor/packages.json while running your app in the terminal with the production tag activated. That means, run your app with the following command, while removing possibly outdated packages (usually non-standard ones)

"meteor run --production"

  1. Keep the app running in production mode. Start commenting out routes in your routes.js file, and see if you can find the route/page that is mucking up all routes and causing this error.

Good luck! / Devmattb