{"action":"opened","issue":{"url":"https://api.github.com/repos/balderdashy/sails/issues/3346","labels_url":"https://api.github.com/repos/balderdashy/sails/issues/3346/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails/issues/3346/comments","events_url":"https://api.github.com/repos/balderdashy/sails/issues/3346/events","html_url":"https://github.com/balderdashy/sails/issues/3346","id":114081019,"number":3346,"title":"unable to overwrite sails.config.paths","user":{"login":"japel","id":2742448,"avatar_url":"https://avatars.githubusercontent.com/u/2742448?v=3","gravatar_id":"","url":"https://api.github.com/users/japel","html_url":"https://github.com/japel","followers_url":"https://api.github.com/users/japel/followers","following_url":"https://api.github.com/users/japel/following{/other_user}","gists_url":"https://api.github.com/users/japel/gists{/gist_id}","starred_url":"https://api.github.com/users/japel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japel/subscriptions","organizations_url":"https://api.github.com/users/japel/orgs","repos_url":"https://api.github.com/users/japel/repos","events_url":"https://api.github.com/users/japel/events{/privacy}","received_events_url":"https://api.github.com/users/japel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-29T15:52:58Z","updated_at":"2015-10-29T15:52:58Z","closed_at":null,"body":"as stated in #3325 it is not possible to overwrite sails.config.paths as opposed to this readme:\r\nhttps://github.com/balderdashy/sails/blob/master/lib/hooks/moduleloader/README.md\r\n\r\nhere an easy to test repo:\r\n\r\nhttps://github.com/japel/sailsConfigPathsTest\r\n\r\nfiles added:\r\n\r\n./config/paths.js\r\n```javascript\r\nmodule.exports.paths = {\r\n  \"models\": \"api/my/new/models/path\"\r\n};\r\n```\r\napi/my/new/models/path/User.js\r\n```javascript\r\nmodule.exports = {\r\n\r\n  attributes: {\r\n    name: 'string',\r\n    age: 'integer',\r\n    active: 'boolean'\r\n  }\r\n};\r\n```\r\nhow to test:\r\n\r\nclone\r\nnpm install\r\nsails console\r\n> console.log(sails.config.paths);\r\noutputs:\r\n```javascript\r\n{ models: 'X:\\\\sailsConfigPathsTest\\\\api\\\\models',\r\n  tmp: 'X:\\\\sailsConfigPathsTest\\\\.tmp',\r\n  config: 'X:\\\\sailsConfigPathsTest\\\\config',\r\n  controllers: 'X:\\\\sailsConfigPathsTest\\\\api\\\\controllers',\r\n  policies: 'X:\\\\sailsConfigPathsTest\\\\api\\\\policies',\r\n  services: 'X:\\\\sailsConfigPathsTest\\\\api\\\\services',\r\n  adapters: 'X:\\\\sailsConfigPathsTest\\\\api\\\\adapters',\r\n  hooks: 'X:\\\\sailsConfigPathsTest\\\\api\\\\hooks',\r\n  blueprints: 'X:\\\\sailsConfigPathsTest\\\\api\\\\blueprints',\r\n  responses: 'X:\\\\sailsConfigPathsTest\\\\api\\\\responses',\r\n  views: 'X:\\\\sailsConfigPathsTest\\\\views',\r\n  layout: 'X:\\\\sailsConfigPathsTest\\\\views\\\\layout.ejs',\r\n  public: 'X:\\\\sailsConfigPathsTest\\\\.tmp\\\\public' }\r\n```"}}