{"action":"closed","issue":{"url":"https://api.github.com/repos/browserstack/browserstack-runner/issues/168","repository_url":"https://api.github.com/repos/browserstack/browserstack-runner","labels_url":"https://api.github.com/repos/browserstack/browserstack-runner/issues/168/labels{/name}","comments_url":"https://api.github.com/repos/browserstack/browserstack-runner/issues/168/comments","events_url":"https://api.github.com/repos/browserstack/browserstack-runner/issues/168/events","html_url":"https://github.com/browserstack/browserstack-runner/issues/168","id":172176514,"number":168,"title":"Loading js-reporters.js fails after installing with npm3","user":{"login":"TehShrike","id":1141869,"avatar_url":"https://avatars.githubusercontent.com/u/1141869?v=3","gravatar_id":"","url":"https://api.github.com/users/TehShrike","html_url":"https://github.com/TehShrike","followers_url":"https://api.github.com/users/TehShrike/followers","following_url":"https://api.github.com/users/TehShrike/following{/other_user}","gists_url":"https://api.github.com/users/TehShrike/gists{/gist_id}","starred_url":"https://api.github.com/users/TehShrike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TehShrike/subscriptions","organizations_url":"https://api.github.com/users/TehShrike/orgs","repos_url":"https://api.github.com/users/TehShrike/repos","events_url":"https://api.github.com/users/TehShrike/events{/privacy}","received_events_url":"https://api.github.com/users/TehShrike/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-19T17:05:04Z","updated_at":"2016-12-27T14:06:26Z","closed_at":"2016-12-27T14:06:26Z","body":"See here: https://github.com/browserstack/browserstack-runner/blob/master/lib/server.js#L48\n\nIt attempts to load `path.join(__dirname, '../node_modules/js-reporters/dist/js-reporters.js')`, which would be valid if `browserstack-runner` was installed as a dependency by npm2.\n\nHowever, npm3 installs dependencies as flat as possible, meaning that the `js-reporters` dependency could be anywhere up the directory structure.\n\nWhen running tests, this issue manifests itself via this stack trace:\n\n```\nLaunching 1 worker(s) for 1 run(s).\nfs.js:634\n  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);\n                 ^\n\nError: ENOENT: no such file or directory, open '/Users/josh/code/abstract-state-router/node_modules/browserstack-runner/node_modules/js-reporters/dist/js-reporters.js'\n    at Error (native)\n    at Object.fs.openSync (fs.js:634:18)\n    at Object.fs.readFileSync (fs.js:502:33)\n    at getReporterPatch (/Users/josh/code/abstract-state-router/node_modules/browserstack-runner/lib/server.js:49:34)\n    at writeResponse (/Users/josh/code/abstract-state-router/node_modules/browserstack-runner/lib/server.js:90:19)\n    at /Users/josh/code/abstract-state-router/node_modules/browserstack-runner/lib/server.js:129:13\n    at tryToString (fs.js:449:3)\n    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:436:12)\n```\n"}}
{"actor":{"display_login":"AnkurGel"}}