-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error : There is no route for the path: / #608
Comments
Yes. I have got same error. |
@vmusulainen |
Yes, I agree all work fine if the route for "/" is set in a file and this file can be found. |
You can only use one routing package in a application. It always conflicts. Try removing Iron Router. |
No-no, I haven't any router in the app before. when meteor starts the next code is executed meteor://💻app/packages/kadira_flow-router/client/_init.js
|
Can you show me installed packages list. |
Steps for reproducing
open a brower on http://localhost:3000 and you will get the next exception in console
Debug information
|
I can confirm this... I 've spent the whole day trying to find out what is going on... In addition, if I move my routes.js to /lib, then I face problems when importing html templates which now have to be imported in routes.js as meteor cannot see them anymore in /imports/ui |
Had exactly the same issues. Only way I could solve it was going to a full meteor modules application structure per the meteor guide: http://guide.meteor.com/structure.html Seems like overkill for the small demo app I was putting together to demonstrate a different problem but at least it works now. |
After lot of testing it seems that either Meteor 1.3 or the FlowRouter is extremely sensitive to errors that did not use to break apps. Most probably the former as now the order of imports is important. For example, I am using the Buttons plugin of DataTables. It could not find some default settings before the actual plugin was loaded next. I had to prefix with |
Does anyone found a solution for this problem? |
+1 |
Do I really have to refactor my entire application to fix this? |
++ same is this problem solved? |
Same problem here. I am in the middle of moving my entire application to /imports and it started popping up about 80% of the way through. No matter what I do I can't get it to recognize the routes I have defined now. |
I think I may have the same issue... still researching... but @vmusulainen your steps for reproducing may not be correct. After completing steps 1-4 you still have not created a router file. If you add a routes.js file in /lib with a path for '/' then you shouldn't see the error... The above does make me think that the error is caused when FlowRouter cannot find the routes file, which is strange in my case as it exists in the /lib directory too... |
hi also having this issue. Any updates on this? Can i force it to load first by changing the file name or something? |
I fixed this finally. I removed any wait() and ready() callbacks from FlowRouter and handled any redirects inside my React "Application" component. Once I took that logic out of FlowRouter everything worked great. |
I also hit this problem now. I'm using Meteor 1.4 release. My app was working until I git-cloned flow-router to myproj/packages/ It turns out it doesn't matter what router you import, if any type of router is part of your project it gets loaded. For anyone still experiencing this issue, you can try what Nexus7 suggested above, move myroutes.js to /lib but you don't have to move all your components. You can keep your components in /imports/client. I just tried it. Just wrap your |
@Nexus7 - can you post a forked meteor-todos with your change? I'm not following your fix 100%. Thx! |
We are facing the same error. Anyone who has solved this issue? |
Hello I figured 2 bugs on my side that lead to this error message:
|
i found a timing issue with FlowRouter and AccountsTemplates, and waiting the FlowRouter. i found this code in useraccounts_flow-routing:
that indicated to me there may be a race condition. whenever i had the failed route, i saw that AccountsTemplates was not yet initialized, so i changed my flow router wait code to include its initialize, and it seems to be working for me (this is at the top of my lib/routes.js):
... i put in this wait originally so i could easily check user roles (a la AccountsTemplates.ensureSignedIn) in some of the routes... |
per my comment above, it does look to fix 1 race condition. but i was still able to get into a scenario where there's a blank screen. unsure why: both the AT initialize and the FlowRouter initialize are still false, but the autorun seems to have stopped. |
if it helps anyone, i believe i've solved my 2nd race condition. it looks like AccountsTemplates._initialized could flip to true, but the autorun() wouldn't run. further, i attached an onStop() listener to the autorun() to demonstrate that it wasn't stopping. it's a little ugly, but i used a timer to re-evaluate AccountsTemplates._initialized and invalidate the tracker once it goes true. so far, so good on getting rid of all of my blank screens.
|
i'm having the exact same issue when i try to deploy.
currently testing the bug with
Try to solve it with;
Maybe changing to react router would do the trick.. but thats quite some migration effort. |
Any updates? |
Yep, same here! 💅 |
I cant help. I moved the project to react router. Much lager community to solve these issues. |
In my case the /import/client/startup/routes.js does not even run before Flowrouter so of course it has no routes.. I too wait for subscriptions from roles. Cloned flow-router in packages as well. |
Having issues here as well. |
same here. any progress on this issue? |
I my case i follow the answer of @szimmers, it's works while we got a official and better solution. |
I faced this issue when I tried to use Bootstrap 4 by placing it in a /main/client/lib/bootstrap/ folder (I attempted a million different methods for importing Bootstrap, no matter what I did it always loaded AFTER my custom css file - hence the lib folder). Bootstrap 4 gave an error in the console (described here: twbs/bootstrap#18732) - "Bootstrap tooltips require Tether." I downgraded Bootstrap to the latest v3 which doesn't require Tether and the Flow Router issue was resolved. This is congruent with the issue as described by @pmoulos :
|
I had the same problem once, what I did is delete all installed packages from package.json (not the ones who came with Meteor itself), then install one by one, first flow-router, then kadira blaze layout and tested with the two of then. Turns out it was a problem in the initialization of the plugin. It's a guess, but I think that I faced the problem because or I did'nt stopped the server before initialize flow router in first time or it was a package helper to flow router that was throwing an error. So:
PS; sorry for this bad english |
A newbie here. Moving my routes.js to /lib worked for me, but you will have to wrap your code with if(Meteor.isClient){} for your imports to work. |
Removing |
This worked for me - Thanks @joaocarloscabral ! |
Hi! I didn't find the solution for this problem by anything here, but after 8 hours of hacking, i solved it.
I removed the following problematic packages:
My tip for anyone who needs to figure out their own way of solving this bug:
"meteor run --production"
Good luck! |
I'm getting this problem on Meteor 1.8, in the most basic setup:
I start my app with
I tried placing routes.js in /client and in /imports/startup/client/. Both result in the same error message. Am I missing something obvious, or is this a meteor bug? (I'm running other apps at 1.8, using flow-router, that were upgraded from 1.7x, without a problem.) Edit: If I put my routes (what was in routes.js) in main.js, flow-router works. |
For those fast-forwarding to the end looking for a solution: the solution given by @joaocarloscabral (#608 (comment)) worked like a charm.
Took off the {
"name": "app",
"private": true,
"scripts": {
"start": "meteor run",
"test": "meteor test --once --driver-package meteortesting:mocha",
"test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha",
"visualize": "meteor --production --extra-packages bundle-visualizer"
},
"dependencies": {
"@babel/runtime": "^7.4.5",
"meteor-node-stubs": "^0.4.1"
- },
- "meteor": {
- "mainModule": {
- "client": "client/main.js",
- "server": "server/main.js"
- },
- "testModule": "tests/main.js"
}
} , restarted |
Can't believe it works lol |
Try just import your routes file on main/client.js You don't need to remove that: from the package.json |
Thanks @rafaeljcadena I don't have a /main/ folder. Should I create one in the root of my project? |
Ops, my mistake. I should say:
It's created by default on Meteor(v1.8). I'm using it with integrated with React. |
I have updated Meteor to Meteor 1.3.2.4. and facing the issue.
Error : There is no route for the path: /
I tried the both in both environment "meteor" and "meteor run --production" the same error will displayed in console.
I have installed the following packages.
accounts-oauth 1.1.12 Common code for OAuth-based login services
accounts-password 1.1.8 Password support for accounts
autopublish 1.0.7 (For prototyping only) Publish the entire database to all clients
blaze-html-templates 1.0.4 Compile HTML templates into reactive UI with Meteor Blaze
cfs:gridfs 0.0.33 GridFS storage adapter for CollectionFS
cfs:standard-packages 0.5.9 Filesystem for Meteor, collectionFS
ecmascript 0.4.3 Compiler plugin that supports ES2015+ in all .js files
email 1.0.12 Send email messages
es5-shim 4.5.10 Shims and polyfills to improve ECMAScript 5 support
flowkey:bootstrap-tour 1.1.0 A Meteor.js / Blaze integration for bootstrap-tour
insecure 1.0.7 (For prototyping only) Allow all database writes from the client
jquery 1.11.8 Manipulate the DOM using CSS selectors
kadira:blaze-layout 2.3.0 Layout Manager for Blaze (works well with FlowRouter)
kadira:flow-router 2.12.1 Carefully Designed Client Side Router for Meteor
meteor-base 1.0.4 Packages that every Meteor app needs
mobile-experience 1.0.4 Packages for a great mobile user experience
mongo 1.1.7 Adaptor for using MongoDB and Minimongo over DDP
pauli:accounts-linkedin 1.3.1 Accounts service for LinkedIn accounts
service-configuration 1.0.9 Manage the configuration for third-party services
session 1.1.5 Session variable
standard-minifier-css 1.0.6 Standard css minifier used with Meteor apps by default.
standard-minifier-js 1.0.6 Standard javascript minifiers used with Meteor apps by default.
themeteorchef:jquery-validation 1.14.0 jQuery Validation by jzaefferer, repackaged for Meteor.
tomi:upload-jquery 2.4.0 Client template for uploads using "jquery-file-upload" from blueimp
tomi:upload-server 1.3.4 Upload server for Meteor. Allows to save and serve files from arbitrary directory
tracker 1.0.13 Dependency tracker to allow reactive callbacks
u2622:persistent-session 0.4.4 Persistently store Session data on the client
zimme:active-route 2.3.2 Active route helpers
My routing.js is
exposed = FlowRouter.group();
exposed.route('/', {
triggersEnter: function () {
if (Meteor.loggingIn() && typeof Meteor.userId() !== 'undefined') {
FlowRouter.go("/dashboard");
}
},
action: function () {
BlazeLayout.render("mainTemplate", {content: "homePage"});
}
});
exposed.route('/login', {
triggersEnter: function () {
if (Meteor.userId() !== null) {
FlowRouter.go("/dashboard");
}
},
action: function (params) {
BlazeLayout.render("mainTemplate", {content: "login"});
}
});
The text was updated successfully, but these errors were encountered: