{"action":"opened","issue":{"url":"https://api.github.com/repos/TryGhost/Ghost/issues/6551","repository_url":"https://api.github.com/repos/TryGhost/Ghost","labels_url":"https://api.github.com/repos/TryGhost/Ghost/issues/6551/labels{/name}","comments_url":"https://api.github.com/repos/TryGhost/Ghost/issues/6551/comments","events_url":"https://api.github.com/repos/TryGhost/Ghost/issues/6551/events","html_url":"https://github.com/TryGhost/Ghost/issues/6551","id":135029977,"number":6551,"title":"Unhandled rejection TypeError: Cannor read property 'define' of undefined","user":{"login":"nevi-me","id":1876878,"avatar_url":"https://avatars.githubusercontent.com/u/1876878?v=3","gravatar_id":"","url":"https://api.github.com/users/nevi-me","html_url":"https://github.com/nevi-me","followers_url":"https://api.github.com/users/nevi-me/followers","following_url":"https://api.github.com/users/nevi-me/following{/other_user}","gists_url":"https://api.github.com/users/nevi-me/gists{/gist_id}","starred_url":"https://api.github.com/users/nevi-me/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nevi-me/subscriptions","organizations_url":"https://api.github.com/users/nevi-me/orgs","repos_url":"https://api.github.com/users/nevi-me/repos","events_url":"https://api.github.com/users/nevi-me/events{/privacy}","received_events_url":"https://api.github.com/users/nevi-me/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-20T04:02:47Z","updated_at":"2016-02-20T04:02:47Z","closed_at":null,"body":"Welcome to Ghost's GitHub repo! 👋🎉\r\n\r\nDo you need help or have a question? Please come chat in Slack: https://ghost.org/slack 👫. Got an idea for a new feature? Please add it to our wishlist: http://ideas.ghost.org 🌟. Found a bug? Please fill out the sections below... thank you 👍\r\n\r\n### Issue Summary\r\n\r\nFor a few weeks now I have been getting an error with Ghost when starting it with an Express app.\r\nI get an error on /`ghost/core/server/index.js:100:28` where Node throws an unhandled rejection typeerror. I have added the stack trace at the bottom.\r\n\r\nI haven't been able to diagnose the issue because Ghost starts up properly in my Windows dev environment.\r\n\r\nI removed all node_modules and reinstalled everything as at Ghost@0.7.8, but still got the same error after the fresh install.\r\n\r\n### Steps to Reproduce\r\n\r\n1. Install ghost as Express.js middleware\r\n2. Start Express.js server\r\n3. Get error\r\n\r\nAny other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?\r\n\r\nBelow is a stack trace:\r\n\r\n```\r\nUnhandled rejection TypeError: Cannot read property 'define' of undefined\r\n    at /home/ubuntu-user/var/expressapp/node_modules/ghost/core/server/index.js:100:28\r\n    at tryCatcher (/home/ubuntu-user/var/expressapp/node_modules/ghost/node_modules/bluebird/js/main/util.js:26:23)\r\n    at Promise._settlePromiseFromHandler (/home/ubuntu-user/var/expressapp/node_modules/ghost/node_modules/bluebird/js/main/promise.js:507:31)\r\n    at Promise._settlePromiseAt (/home/ubuntu-user/var/expressapp/node_modules/ghost/node_modules/bluebird/js/main/promise.js:581:18)\r\n    at Async._drainQueue (/home/ubuntu-user/var/expressapp/node_modules/ghost/node_modules/bluebird/js/main/async.js:128:12)\r\n    at Async._drainQueues (/home/ubuntu-user/var/expressapp/node_modules/ghost/node_modules/bluebird/js/main/async.js:133:10)\r\n    at Immediate.Async.drainQueues (/home/ubuntu-user/var/expressapp/node_modules/ghost/node_modules/bluebird/js/main/async.js:15:14)\r\n    at processImmediate [as _immediateCallback] (timers.js:383:17)\r\n```\r\n### Technical details:\r\n\r\n* Ghost Version: 0.7.6 - 0.7.8\r\n* Node Version: 4.3.1\r\n* Browser/OS: any/Ubuntu LTS 14.04\r\n* Database: sqlite\r\n"}}