{"action":"opened","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/3921","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/3921/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/3921/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/3921/events","html_url":"https://github.com/sequelize/sequelize/issues/3921","id":87624485,"number":3921,"title":"Cannot call method 'then' of undefined","user":{"login":"miguelcrespo","id":5839623,"avatar_url":"https://avatars.githubusercontent.com/u/5839623?v=3","gravatar_id":"","url":"https://api.github.com/users/miguelcrespo","html_url":"https://github.com/miguelcrespo","followers_url":"https://api.github.com/users/miguelcrespo/followers","following_url":"https://api.github.com/users/miguelcrespo/following{/other_user}","gists_url":"https://api.github.com/users/miguelcrespo/gists{/gist_id}","starred_url":"https://api.github.com/users/miguelcrespo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miguelcrespo/subscriptions","organizations_url":"https://api.github.com/users/miguelcrespo/orgs","repos_url":"https://api.github.com/users/miguelcrespo/repos","events_url":"https://api.github.com/users/miguelcrespo/events{/privacy}","received_events_url":"https://api.github.com/users/miguelcrespo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-12T06:20:39Z","updated_at":"2015-06-12T06:20:39Z","closed_at":null,"body":"Hi.\r\n\r\nI have an issue, I am starting with your ORM and I am following this code to implement it in my express project: https://github.com/sequelize/express-example\r\n\r\nThis is my user model:\r\n```\r\nmodule.exports = function(sequelize, DataTypes) {\r\n  var User = sequelize.define(\"User\", {\r\n    username: DataTypes.STRING\r\n  });\r\n\r\n  return User;\r\n};\r\n```\r\nAnd here is where I'm trying to create a new object:\r\n```\r\nvar models = require(\"../api/models\");\r\nmodels.sequelize.sync({force: true}).then(function () {\r\n  models.User.create({\r\n    username: \"MiguelCrespo\"\r\n  }).then(function() {\r\n    console.log(\"THEN\");\r\n  });\r\n});\r\n\r\nI get this error:\r\n\r\n![screenshot from 2015-06-12 01 19 45](https://cloud.githubusercontent.com/assets/5839623/8124450/2ad7b44c-10a1-11e5-83ac-24fb1562c128.png)\r\n\r\nI appreciate your help.\r\n\r\n"}}