{"action":"created","issue":{"url":"https://api.github.com/repos/SpookyJS/SpookyJS/issues/187","repository_url":"https://api.github.com/repos/SpookyJS/SpookyJS","labels_url":"https://api.github.com/repos/SpookyJS/SpookyJS/issues/187/labels{/name}","comments_url":"https://api.github.com/repos/SpookyJS/SpookyJS/issues/187/comments","events_url":"https://api.github.com/repos/SpookyJS/SpookyJS/issues/187/events","html_url":"https://github.com/SpookyJS/SpookyJS/issues/187","id":140055419,"number":187,"title":"Failed to execute hello.js after adding some dependencies","user":{"login":"zxshen17","id":15707017,"avatar_url":"https://avatars.githubusercontent.com/u/15707017?v=3","gravatar_id":"","url":"https://api.github.com/users/zxshen17","html_url":"https://github.com/zxshen17","followers_url":"https://api.github.com/users/zxshen17/followers","following_url":"https://api.github.com/users/zxshen17/following{/other_user}","gists_url":"https://api.github.com/users/zxshen17/gists{/gist_id}","starred_url":"https://api.github.com/users/zxshen17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zxshen17/subscriptions","organizations_url":"https://api.github.com/users/zxshen17/orgs","repos_url":"https://api.github.com/users/zxshen17/repos","events_url":"https://api.github.com/users/zxshen17/events{/privacy}","received_events_url":"https://api.github.com/users/zxshen17/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-11T01:08:22Z","updated_at":"2016-03-11T08:11:37Z","closed_at":null,"body":"Hi, I git clone a `spookyjs` from github, then `npm install` and run `node examples/hello.js`. \r\n\r\nEverything goes well and `hello.js` outputs:\r\n\r\n    Hello, from Spooky the Tuff Little Ghost - Wikipedia, the free encyclopedia\r\n\r\nThen I add some dependencies to the package.json:\r\n\r\nFrom\r\n\r\n      \"dependencies\": {\r\n        \"underscore\": \"1.3.x\",\r\n        \"async\": \"0.1.x\",\r\n        \"tiny-jsonrpc\": \"0.2.x\",\r\n        \"carrier\": \"0.1.x\",\r\n        \"duplexer\": \"0.0.x\",\r\n        \"readable-stream\": \"~1.0.2\"\r\n      }\r\n\r\nTo\r\n\r\n      \"dependencies\": {\r\n        \"underscore\": \"1.3.x\",\r\n        \"async\": \"0.1.x\",\r\n        \"tiny-jsonrpc\": \"0.2.x\",\r\n        \"carrier\": \"0.1.x\",\r\n        \"duplexer\": \"0.0.x\",\r\n        \"readable-stream\": \"~1.0.2\",\r\n\r\n        \"express\": \"^4.13.4\",\r\n        \"bluebird\": \"^3.3.4\",\r\n        \"body-parser\": \"~1.13.2\",\r\n        \"consul\": \"^0.23.0\",\r\n        \"cookie-parser\": \"~1.3.5\",\r\n        \"debug\": \"~2.2.0\",\r\n        \"express\": \"~4.13.1\",\r\n        \"jade\": \"~1.11.0\",\r\n        \"morgan\": \"~1.6.1\",\r\n        \"native-dns\": \"^0.7.0\",\r\n        \"node-phantom\": \"^0.2.5\",\r\n        \"serve-favicon\": \"~2.3.0\",\r\n        \"util\": \"^0.10.3\",\r\n        \"webpage\": \"^0.3.0\"\r\n      }\r\n\r\nThen I `npm install`, and run `node examples/hello.js` again. But now it failed with weird logs:\r\n\r\n    { id: 1,\r\n      code: -32603,\r\n      message: 'undefined is not a constructor (evaluating \\'require(\\'webpage\\').create()\\')' }\r\n    { id: 2, code: -32603, message: 'Type error' }\r\n    { id: 3, code: -32603, message: 'Type error' }\r\n\r\nMy question is, why does adding some dependencies to `SpookyJS` lead to such an error and how can this error be avoided?"},"comment":{"url":"https://api.github.com/repos/SpookyJS/SpookyJS/issues/comments/195247888","html_url":"https://github.com/SpookyJS/SpookyJS/issues/187#issuecomment-195247888","issue_url":"https://api.github.com/repos/SpookyJS/SpookyJS/issues/187","id":195247888,"user":{"login":"zxshen17","id":15707017,"avatar_url":"https://avatars.githubusercontent.com/u/15707017?v=3","gravatar_id":"","url":"https://api.github.com/users/zxshen17","html_url":"https://github.com/zxshen17","followers_url":"https://api.github.com/users/zxshen17/followers","following_url":"https://api.github.com/users/zxshen17/following{/other_user}","gists_url":"https://api.github.com/users/zxshen17/gists{/gist_id}","starred_url":"https://api.github.com/users/zxshen17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zxshen17/subscriptions","organizations_url":"https://api.github.com/users/zxshen17/orgs","repos_url":"https://api.github.com/users/zxshen17/repos","events_url":"https://api.github.com/users/zxshen17/events{/privacy}","received_events_url":"https://api.github.com/users/zxshen17/received_events","type":"User","site_admin":false},"created_at":"2016-03-11T08:11:37Z","updated_at":"2016-03-11T08:11:37Z","body":"After a further investigate, I find add only `\"webpage\": \"^0.3.0\"` to dependencies will lead to that error."}}