{"record":{"id":"1b6a8f0458fe0f04","repo":"balderdashy/sails","slug":"warning-was-bound-to-a-target-actionglob-t","errorCode":null,"errorMessage":"${warning} was bound to a target `${actionGlob}` that doesn't match any registered actions.","messagePattern":"(.+?) was bound to a target `(.+?)` that doesn't match any registered actions\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"lib/app/private/controller/load-action-modules.js","lineNumber":239,"sourceCode":"          })) {\n            return;\n          }\n        }\n        // Otherwise, construct a warning using the _middlewareType properties (if available) of the middleware functions\n        // that were mapped to this action glob.\n        var warning = 'Action middleware ';\n        warning += (function(){\n          var fnDescs = _.reduce(fns, function(memo, fn) {\n            if (fn._middlewareType) { memo.push(fn._middlewareType); }\n            return memo;\n          }, []);\n          if (fnDescs.length) {\n            return '(' + fnDescs.join(', ') + ') ';\n          }\n          return '';\n        })();//†\n        warning += 'was bound to a target `' + actionGlob + '` that doesn\\'t match any registered actions.';\n        sails.log.warn(warning);\n        raisedWarnings = true;\n      });//∞\n    });//∞\n\n    // If we raised any warnings, add an extra line break afterwards.\n    if (raisedWarnings) {\n      console.log();\n    }\n\n    // All done.\n    return cb();\n\n  }); // </includeAll>\n\n};\n","sourceCodeStart":221,"sourceCodeEnd":255,"githubUrl":"https://github.com/balderdashy/sails/blob/7b76422cc27823df033572bdda5c4910a68b697f/lib/app/private/controller/load-action-modules.js#L221-L255","documentation":"Sails custom routes can bind URL patterns to action globs (e.g. 'UserController.*'). When a route's target glob matches zero registered actions, Sails logs this warning including the route path prefix and the unmatched glob, so you know the route exists but will never resolve to an action at request time.","triggerScenarios":"A route in config/routes.js binds to an action glob such as 'some/folder/*' or 'UserController.*' while no registered action matches — due to a typo, the action file never loaded (e.g. ignored as garbage), or the controller was renamed/refactored.","commonSituations":"Renaming actions or controllers without updating config/routes.js, typos in route targets, actions ignored by the filename-convention loader, or relying on actions that were removed during an upgrade (e.g. Sails 0.12 to 1.x migration).","solutions":["Fix the glob in config/routes.js to the correct action identity (check sails get-actions / registered actions).","Ensure the target action file exists with a valid name so it actually loads and registers.","Remove the dead route if the action was intentionally deleted."],"exampleFix":"// before (config/routes.js)\n'GET /users': 'UsersController.find'   // controller is actually named UserController\n// after\n'GET /users': 'UserController.find'","handlingStrategy":"validation","validationCode":"// Verify every route target resolves before lift:\nfor (const [addr, target] of Object.entries(sails.config.routes)) {\n  const glob = typeof target === 'string' ? target.split(' ')[0] : null;\n  if (glob && !sails.hooks.actions.registeredActions().some(a => micromatch.isMatch(a.identity, glob))) {\n    console.warn(`Route ${addr} target glob '${glob}' matches no registered action`);\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Update config/routes.js whenever you rename controllers/actions.","Use `sails run routes` or inspect registered actions to verify targets exist.","Check lift output for this warning in CI/development before deploying."],"tags":["routes","actions","glob","routing"],"backgroundTag":"unmatched-route-target","analyzedSha":"7b76422cc27823df033572bdda5c4910a68b697f","analyzedAt":"2026-09-01T04:01:57.104Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}