title: sails lift fail at typeerror this._normalizeAssociations is not a function
body: <p>After checkout a project from GitLab, I issued 'sails lift' in the cmd, it is OK. I sent Ctrl-C and issue 'sails lift' again, here is the output:</p>
  
  <pre><code>info: Starting app...
  
  info: 
  info: 
  info:    Sails              &lt;|
  info:    v0.10.5             |\
  info:                       /|.\
  info:                      / || \
  info:                    ,'  |'  \
  info:                 .-'.-==|/_--'
  info:                 `--'-------' 
  info:    __---___--___---___--___---___--___
  info:  ____---___--___---___--___---___--___-__
  info: 
  info: Server lifted in `D:\CoachGarden\meetup2`
  info: To see your app, visit http://localhost:1337
  info: To shut down Sails, press &lt;CTRL&gt; + C at any time.
  
  debug: --------------------------------------------------------
  debug: :: Sun Feb 28 2016 10:02:45 GMT+0800 (China Standard Time)
  
  debug: Environment : development
  debug: Port        : 1337
  debug: --------------------------------------------------------
  D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\lib\waterline\model\lib\model.js:54
    this._normalizeAssociations();
         ^
  
  TypeError: this._normalizeAssociations is not a function
      at module.exports (D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\lib\waterline\model\lib\model.js:54:8)
      at child [as constructor] (D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\lib\waterline\utils\extend.js:17:39)
      at new bound (D:\CoachGarden\meetup2\node_modules\sails\node_modules\lodash\dist\lodash.js:726:29)
      at D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\lib\waterline\query\finders\basic.js:388:23
      at Array.forEach (native)
      at returnResults (D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\lib\waterline\query\finders\basic.js:387:21)
      at D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\lib\waterline\query\finders\basic.js:272:16
      at D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\lib\waterline\query\finders\operations.js:82:7
      at D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\node_modules\async\lib\async.js:49:16
      at Object.async.forEachOf.async.eachOf (D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\node_modules\async\lib\async.js:227:20)
      at Object.async.forEach.async.each (D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\node_modules\async\lib\async.js:206:22)
      at D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\lib\waterline\query\finders\operations.js:433:11
      at D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\lib\waterline\query\finders\operations.js:572:5
      at D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\node_modules\async\lib\async.js:49:16
      at Object.async.forEachOf.async.eachOf (D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\node_modules\async\lib\async.js:227:20)
      at Object.async.forEach.async.each (D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\node_modules\async\lib\async.js:206:22)
      at _buildChildOpts (D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\lib\waterline\query\finders\operations.js:461:9)
      at _execChildOpts (D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\lib\waterline\query\finders\operations.js:429:8)
      at D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\lib\waterline\query\finders\operations.js:80:10
      at wrapper (D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\node_modules\lodash\index.js:3602:19)
      at applyInOriginalCtx (D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\lib\waterline\utils\normalize.js:421:80)
      at wrappedCallback (D:\CoachGarden\meetup2\node_modules\sails\node_modules\waterline\lib\waterline\utils\normalize.js:320:18)
  </code></pre>
  
  <p>After search with Google, I give "issue 'del .tmp\localDiskDb.db', then issue 'sails lift'" a try, 'sails lift' works again. Now I need to del that Db file every time to get sails successfully lifted.</p>
  
  <p>here is the content of .tmp\localDiskDb.db:</p>
  
  <pre><code>{
    "data": {
      "answer": [],
      "comment": [],
      "event": [],
      "group": [],
      "mail": [],
      "paper": [],
      "photo": [],
      "privilege": [
        {
          "userid": "00000001",
          "groupid": null,
          "scope": "global",
          "role": "administrator",
          "creategroup": "yes",
          "deletegroup": "yes",
          "editgroup": "yes",
          "createevent": "yes",
          "deleteevent": "yes",
          "editevent": "yes",
          "addgroupmember": "yes",
          "deletegroupmember": "yes",
          "exportgroupmember": "yes",
          "addeventmember": "yes",
          "deleteeventmember": "yes",
          "exporteventmember": "yes",
          "uploadpaper": "yes",
          "deletepaper": "yes",
          "gettestreport": "yes",
          "createtag": "yes",
          "deletetag": "yes",
          "createdAt": "2016-02-28T02:10:00.632Z",
          "updatedAt": "2016-02-28T02:10:00.632Z",
          "id": 1
        },
        {
          "userid": "00000002",
          "groupid": null,
          "scope": "global",
          "role": "actingadministrator",
          "creategroup": "yes",
          "deletegroup": "yes",
          "editgroup": "yes",
          "createevent": "yes",
          "deleteevent": "yes",
          "editevent": "yes",
          "addgroupmember": "yes",
          "deletegroupmember": "yes",
          "exportgroupmember": "yes",
          "addeventmember": "yes",
          "deleteeventmember": "yes",
          "exporteventmember": "yes",
          "uploadpaper": "yes",
          "deletepaper": "yes",
          "gettestreport": "yes",
          "createtag": "yes",
          "deletetag": "yes",
          "createdAt": "2016-02-28T02:10:00.648Z",
          "updatedAt": "2016-02-28T02:10:00.648Z",
          "id": 2
        },
        {
          "userid": "00000003",
          "groupid": null,
          "scope": "global",
          "role": "globalspecial",
          "creategroup": "yes",
          "deletegroup": "no",
          "editgroup": "yes",
          "createevent": "yes",
          "deleteevent": "yes",
          "editevent": "yes",
          "addgroupmember": "yes",
          "deletegroupmember": "yes",
          "exportgroupmember": "yes",
          "addeventmember": "yes",
          "deleteeventmember": "yes",
          "exporteventmember": "yes",
          "uploadpaper": "yes",
          "deletepaper": "yes",
          "gettestreport": "yes",
          "createtag": "yes",
          "deletetag": "yes",
          "createdAt": "2016-02-28T02:10:00.659Z",
          "updatedAt": "2016-02-28T02:10:00.659Z",
          "id": 3
        },
        {
          "userid": "00000004",
          "groupid": null,
          "scope": "global",
          "role": "globaluser",
          "creategroup": "yes",
          "deletegroup": "no",
          "editgroup": "no",
          "createevent": "no",
          "deleteevent": "no",
          "editevent": "no",
          "addgroupmember": "no",
          "deletegroupmember": "no",
          "exportgroupmember": "no",
          "addeventmember": "no",
          "deleteeventmember": "no",
          "exporteventmember": "no",
          "uploadpaper": "no",
          "deletepaper": "no",
          "gettestreport": "no",
          "createtag": "yes",
          "deletetag": "no",
          "createdAt": "2016-02-28T02:10:00.672Z",
          "updatedAt": "2016-02-28T02:10:00.672Z",
          "id": 4
        },
        {
          "userid": "00000011",
          "groupid": null,
          "scope": "group",
          "role": "groupowner",
          "creategroup": "no",
          "deletegroup": "no",
          "editgroup": "no",
          "createevent": "no",
          "deleteevent": "no",
          "editevent": "no",
          "addgroupmember": "no",
          "deletegroupmember": "no",
          "exportgroupmember": "no",
          "addeventmember": "no",
          "deleteeventmember": "no",
          "exporteventmember": "no",
          "uploadpaper": "no",
          "deletepaper": "no",
          "gettestreport": "no",
          "createtag": "yes",
          "deletetag": "no",
          "createdAt": "2016-02-28T02:10:00.683Z",
          "updatedAt": "2016-02-28T02:10:00.683Z",
          "id": 5
        },
        {
          "userid": "00000012",
          "groupid": null,
          "scope": "group",
          "role": "groupactingowner",
          "creategroup": "no",
          "deletegroup": "no",
          "editgroup": "yes",
          "createevent": "yes",
          "deleteevent": "yes",
          "editevent": "yes",
          "addgroupmember": "yes",
          "deletegroupmember": "yes",
          "exportgroupmember": "yes",
          "addeventmember": "yes",
          "deleteeventmember": "yes",
          "exporteventmember": "yes",
          "uploadpaper": "yes",
          "deletepaper": "yes",
          "gettestreport": "yes",
          "createtag": "yes",
          "deletetag": "yes",
          "createdAt": "2016-02-28T02:10:00.694Z",
          "updatedAt": "2016-02-28T02:10:00.694Z",
          "id": 6
        },
        {
          "userid": "00000013",
          "groupid": null,
          "scope": "group",
          "role": "groupspecial",
          "creategroup": "no",
          "deletegroup": "no",
          "editgroup": "yes",
          "createevent": "yes",
          "deleteevent": "no",
          "editevent": "yes",
          "addgroupmember": "yes",
          "deletegroupmember": "yes",
          "exportgroupmember": "yes",
          "addeventmember": "yes",
          "deleteeventmember": "yes",
          "exporteventmember": "yes",
          "uploadpaper": "yes",
          "deletepaper": "yes",
          "gettestreport": "yes",
          "createtag": "yes",
          "deletetag": "yes",
          "createdAt": "2016-02-28T02:10:00.704Z",
          "updatedAt": "2016-02-28T02:10:00.704Z",
          "id": 7
        },
        {
          "userid": "00000014",
          "groupid": null,
          "scope": "group",
          "role": "groupuser",
          "creategroup": "no",
          "deletegroup": "no",
          "editgroup": "no",
          "createevent": "yes",
          "deleteevent": "no",
          "editevent": "no",
          "addgroupmember": "no",
          "deletegroupmember": "no",
          "exportgroupmember": "yes",
          "addeventmember": "no",
          "deleteeventmember": "no",
          "exporteventmember": "yes",
          "uploadpaper": "no",
          "deletepaper": "no",
          "gettestreport": "no",
          "createtag": "yes",
          "deletetag": "no",
          "createdAt": "2016-02-28T02:10:00.721Z",
          "updatedAt": "2016-02-28T02:10:00.721Z",
          "id": 8
        },
        {
          "userid": "10239936",
          "groupid": null,
          "scope": "global",
          "role": "administrator",
          "creategroup": "yes",
          "deletegroup": "yes",
          "editgroup": "yes",
          "createevent": "yes",
          "deleteevent": "yes",
          "editevent": "yes",
          "addgroupmember": "yes",
          "deletegroupmember": "yes",
          "exportgroupmember": "yes",
          "addeventmember": "yes",
          "deleteeventmember": "yes",
          "exporteventmember": "yes",
          "uploadpaper": "yes",
          "deletepaper": "yes",
          "gettestreport": "yes",
          "createtag": "yes",
          "deletetag": "yes",
          "constructor": {
            "__super__": {}
          },
          "toObject": {},
          "save": {},
          "destroy": {},
          "_defineAssociations": {},
          "_normalizeAssociations": {},
          "_cast": {},
          "validate": {},
          "toJSON": {},
          "createdAt": "2016-02-28T02:10:00.736Z",
          "updatedAt": "2016-02-28T02:10:00.736Z",
          "id": 9
        }
      ],
      "tag": [],
      "user": [],
      "comment_likeby__user_likedcomments": [],
      "event_user__user_events": [],
      "group_user__user_group": []
    },
    "schema": {
      "answer": {
        "paper": {
          "type": "integer",
          "model": "paper",
          "foreignKey": true,
          "alias": "paper"
        },
        "owner": {
          "type": "string",
          "model": "user",
          "foreignKey": true,
          "alias": "owner"
        },
        "reply": {
          "type": "string"
        },
        "score": {
          "type": "integer"
        },
        "id": {
          "type": "integer",
          "autoIncrement": true,
          "primaryKey": true,
          "unique": true
        },
        "createdAt": {
          "type": "datetime"
        },
        "updatedAt": {
          "type": "datetime"
        }
      },
      "comment": {
        "content": {
          "type": "string"
        },
        "likecount": {
          "type": "integer"
        },
        "createdby": {
          "type": "string",
          "model": "user",
          "foreignKey": true,
          "alias": "createdby"
        },
        "event": {
          "type": "integer",
          "model": "event",
          "foreignKey": true,
          "alias": "event"
        },
        "replyto": {
          "type": "integer",
          "model": "comment",
          "foreignKey": true,
          "alias": "replyto"
        },
        "maincomment": {
          "type": "integer",
          "model": "comment",
          "foreignKey": true,
          "alias": "maincomment"
        },
        "id": {
          "type": "integer",
          "autoIncrement": true,
          "primaryKey": true,
          "unique": true
        },
        "createdAt": {
          "type": "datetime"
        },
        "updatedAt": {
          "type": "datetime"
        }
      },
      "event": {
        "topic": {
          "type": "string"
        },
        "desc": {
          "type": "string"
        },
        "address": {
          "type": "string"
        },
        "begindate": {
          "type": "datetime"
        },
        "enddate": {
          "type": "datetime"
        },
        "phoDescription": {
          "type": "string",
          "defaultsTo": "No Description, Add it!"
        },
        "group": {
          "type": "integer",
          "model": "group",
          "foreignKey": true,
          "alias": "group"
        },
        "tags": {
          "type": "string"
        },
        "owner": {
          "type": "string",
          "model": "user",
          "foreignKey": true,
          "alias": "owner"
        },
        "id": {
          "type": "integer",
          "autoIncrement": true,
          "primaryKey": true,
          "unique": true
        },
        "createdAt": {
          "type": "datetime"
        },
        "updatedAt": {
          "type": "datetime"
        }
      },
      "group": {
        "name": {
          "type": "string",
          "unique": true
        },
        "desc": {
          "type": "string"
        },
        "owner": {
          "type": "string",
          "model": "user",
          "foreignKey": true,
          "alias": "owner"
        },
        "groupfd": {
          "type": "string"
        },
        "tags": {
          "type": "string"
        },
        "id": {
          "type": "integer",
          "autoIncrement": true,
          "primaryKey": true,
          "unique": true
        },
        "createdAt": {
          "type": "datetime"
        },
        "updatedAt": {
          "type": "datetime"
        }
      },
      "mail": {
        "to": {
          "type": "array"
        },
        "subject": {
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "contentWithTemplate": {
          "type": "json",
          "defaultsTo": null
        },
        "attachments": {
          "type": "json",
          "defaultsTo": null
        },
        "schedText": {
          "type": "string",
          "defaultsTo": null
        },
        "date": {
          "type": "datetime",
          "defaultsTo": "2016-02-28T02:12:47.734Z"
        },
        "state": {
          "type": "string",
          "enum": [
            "wait",
            "done",
            "failed"
          ],
          "defaultsTo": "wait"
        },
        "retrytimes": {
          "type": "string",
          "defaultsTo": 0
        },
        "loginfo": {
          "type": "string"
        },
        "id": {
          "type": "integer",
          "autoIncrement": true,
          "primaryKey": true,
          "unique": true
        },
        "createdAt": {
          "type": "datetime"
        },
        "updatedAt": {
          "type": "datetime"
        }
      },
      "paper": {
        "name": {
          "type": "string"
        },
        "desc": {
          "type": "string"
        },
        "owner": {
          "type": "string",
          "model": "user",
          "foreignKey": true,
          "alias": "owner"
        },
        "group": {
          "type": "integer"
        },
        "numfortest": {
          "type": "integer"
        },
        "id": {
          "type": "integer",
          "autoIncrement": true,
          "primaryKey": true,
          "unique": true
        },
        "createdAt": {
          "type": "datetime"
        },
        "updatedAt": {
          "type": "datetime"
        }
      },
      "photo": {
        "original": {
          "type": "string"
        },
        "origSize": {
          "type": "integer"
        },
        "origName": {
          "type": "string"
        },
        "origType": {
          "type": "string"
        },
        "thumbnail": {
          "type": "string"
        },
        "small": {
          "type": "string"
        },
        "medium": {
          "type": "string"
        },
        "large": {
          "type": "string"
        },
        "owner": {
          "type": "string",
          "model": "user",
          "foreignKey": true,
          "alias": "owner"
        },
        "album": {
          "type": "integer",
          "model": "event",
          "foreignKey": true,
          "alias": "album"
        },
        "id": {
          "type": "integer",
          "autoIncrement": true,
          "primaryKey": true,
          "unique": true
        },
        "createdAt": {
          "type": "datetime"
        },
        "updatedAt": {
          "type": "datetime"
        }
      },
      "privilege": {
        "userid": {
          "type": "string"
        },
        "role": {
          "type": "string",
          "defaultsTo": "user"
        },
        "scope": {
          "type": "string",
          "enum": [
            "global",
            "group"
          ],
          "defaultsTo": "group"
        },
        "groupid": {
          "type": "integer"
        },
        "creategroup": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "no"
        },
        "deletegroup": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "no"
        },
        "editgroup": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "no"
        },
        "createevent": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "no"
        },
        "deleteevent": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "no"
        },
        "editevent": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "no"
        },
        "addgroupmember": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "no"
        },
        "deletegroupmember": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "no"
        },
        "exportgroupmember": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "no"
        },
        "addeventmember": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "no"
        },
        "deleteeventmember": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "no"
        },
        "exporteventmember": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "no"
        },
        "uploadpaper": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "no"
        },
        "deletepaper": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "no"
        },
        "gettestreport": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "no"
        },
        "createtag": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "yes"
        },
        "deletetag": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "defaultsTo": "no"
        },
        "id": {
          "type": "integer",
          "autoIncrement": true,
          "primaryKey": true,
          "unique": true
        },
        "createdAt": {
          "type": "datetime"
        },
        "updatedAt": {
          "type": "datetime"
        }
      },
      "tag": {
        "name": {
          "type": "string",
          "unique": true
        },
        "desc": {
          "type": "string"
        },
        "uplevel": {
          "type": "integer"
        },
        "owner": {
          "type": "string",
          "model": "user",
          "foreignKey": true,
          "alias": "owner"
        },
        "id": {
          "type": "integer",
          "autoIncrement": true,
          "primaryKey": true,
          "unique": true
        },
        "createdAt": {
          "type": "datetime"
        },
        "updatedAt": {
          "type": "datetime"
        }
      },
      "user": {
        "fullname": {
          "type": "string",
          "defaultsTo": "Anonymous"
        },
        "uid": {
          "type": "string"
        },
        "dn": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "id": {
          "type": "string",
          "primaryKey": true,
          "unique": true
        },
        "userfd": {
          "type": "string"
        },
        "createdAt": {
          "type": "datetime"
        },
        "updatedAt": {
          "type": "datetime"
        }
      },
      "comment_likeby__user_likedcomments": {
        "id": {
          "primaryKey": true,
          "unique": true,
          "autoIncrement": true,
          "type": "integer"
        },
        "comment_likeby": {
          "type": "integer",
          "foreignKey": true,
          "references": "comment",
          "on": "id",
          "via": "user_likedcomments"
        },
        "user_likedcomments": {
          "type": "string",
          "foreignKey": true,
          "references": "user",
          "on": "id",
          "via": "comment_likeby"
        }
      },
      "event_user__user_events": {
        "id": {
          "primaryKey": true,
          "unique": true,
          "autoIncrement": true,
          "type": "integer"
        },
        "event_user": {
          "type": "integer",
          "foreignKey": true,
          "references": "event",
          "on": "id",
          "via": "user_events"
        },
        "user_events": {
          "type": "string",
          "foreignKey": true,
          "references": "user",
          "on": "id",
          "via": "event_user"
        }
      },
      "group_user__user_group": {
        "id": {
          "primaryKey": true,
          "unique": true,
          "autoIncrement": true,
          "type": "integer"
        },
        "group_user": {
          "type": "integer",
          "foreignKey": true,
          "references": "group",
          "on": "id",
          "via": "user_group"
        },
        "user_group": {
          "type": "string",
          "foreignKey": true,
          "references": "user",
          "on": "id",
          "via": "group_user"
        }
      }
    },
    "counters": {
      "answer": {},
      "comment": {},
      "event": {},
      "group": {},
      "mail": {},
      "paper": {},
      "photo": {},
      "privilege": {
        "id": 9
      },
      "tag": {},
      "user": {},
      "comment_likeby__user_likedcomments": {},
      "event_user__user_events": {},
      "group_user__user_group": {}
    }
  }
  </code></pre>
  
  <p>My question is what do I need to do in order to find the cause of this issue, and fix it?</p>
  
  <p>I am a newbie on sails. Any suggestion will be appreciated.</p>