Sails version: 0.12.7
Node version: 4.4.7
NPM version: 3.10.8
Operating system: windows 10 pro
To reproduce you can follow these steps:
- api
|- controllers
|- api
|- UserController.js
|- page
|- HomeController.js
module.exports.routes = {
'/': {
controller: "page/HomeController",
action: "default"
}
};
node app.js
Ignored attempt to bind route (/) to unkown controller :: page/home
What's happen?
And im breakpoint and looked global variable
sails.controllers:
"page\home"
Controllers sub forder separator is windows separator "\", not url separator "/"
Hi @cjy37! It looks like you missed a step or two when you created your issue. Please edit your comment (use the pencil icon at the top-right corner of the comment box) and fix the following:
As soon as those items are rectified, post a new comment (e.g. “Ok, fixed!”) below and we'll take a look. Thanks!
_If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected]._
Ok, fixed!
Sorry to be a hassle, but it looks like your issue is still missing some required info. Please double-check your initial comment and try again.
_If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected]._
Ok, fixed!
Sorry to be a hassle, but it looks like your issue is still missing some required info. Please double-check your initial comment and try again.
_If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected]._
Windows 10 pro
Node: 6.9.0
Sails 0.12.7
I'm seeing this issue too. If your route has a forward slash in the path to your controller for example it will fail to register it, if you use two back slashes it is fine. It is really very easy to reproduce.:
'get /v1/status1': 'v1\\StatusController.index''get /v1/status2': 'v1/StatusController.index'/v1/status1 route will work v1/status2 will not. It should also be noted this behaviour has only been observed on Windows so far.
I should also add this started happening in sails 0.12.5. In the above statement the reverse is true in regards to routes prior to 0.12.5
@LeeGDavis see #3858 -- this is a symptom of the same issue, so the same fix should apply. Please give it a test and close if it looks good!
@cjy37 @LeeGDavis just following up on this guys, going to give it the "waiting to close" label. If you're still seeing it after applying the fix from #3858, just post here and let us know (and @sailsbot will automatically remove that label)
@mikermcneil @sgress454 @cjy37 This issue is resolved for me after applying the fix in #3858.
Good, include-all update to 1.0.8, this issue fixed! @LeeGDavis @mikermcneil @sgress454
Ok, fixed!
Most helpful comment
Windows 10 pro
Node: 6.9.0
Sails 0.12.7
I'm seeing this issue too. If your route has a forward slash in the path to your controller for example it will fail to register it, if you use two back slashes it is fine. It is really very easy to reproduce.:
'get /v1/status1': 'v1\\StatusController.index''get /v1/status2': 'v1/StatusController.index'/v1/status1 route will work v1/status2 will not. It should also be noted this behaviour has only been observed on Windows so far.