{"action":"created","issue":{"url":"https://api.github.com/repos/adambom/parallel.js/issues/56","labels_url":"https://api.github.com/repos/adambom/parallel.js/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/adambom/parallel.js/issues/56/comments","events_url":"https://api.github.com/repos/adambom/parallel.js/issues/56/events","html_url":"https://github.com/adambom/parallel.js/issues/56","id":25000008,"number":56,"title":"BUG: paralleljs fails in browserify","user":{"login":"eugeneware","id":38154,"avatar_url":"https://avatars.githubusercontent.com/u/38154?v=3","gravatar_id":"","url":"https://api.github.com/users/eugeneware","html_url":"https://github.com/eugeneware","followers_url":"https://api.github.com/users/eugeneware/followers","following_url":"https://api.github.com/users/eugeneware/following{/other_user}","gists_url":"https://api.github.com/users/eugeneware/gists{/gist_id}","starred_url":"https://api.github.com/users/eugeneware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eugeneware/subscriptions","organizations_url":"https://api.github.com/users/eugeneware/orgs","repos_url":"https://api.github.com/users/eugeneware/repos","events_url":"https://api.github.com/users/eugeneware/events{/privacy}","received_events_url":"https://api.github.com/users/eugeneware/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/adambom/parallel.js/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/adambom/parallel.js/labels/up%20for%20grabs","name":"up for grabs","color":"e102d8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-01-03T03:18:04Z","updated_at":"2015-11-14T10:01:13Z","closed_at":"2014-01-21T20:50:21Z","body":"When I try to use paralleljs in browserify with the following code:\r\n\r\n``` js\r\n// test.js\r\nvar Parallel = require('paralleljs');\r\nvar p = new Parallel('forwards');\r\np.spawn(function (data) {\r\n  data = data.split('').reverse().join('');\r\n  console.log(data); // logs sdrawrof\r\n  return data;\r\n}).then(function (data) {\r\n  console.log(data) // logs sdrawrof\r\n});\r\n```\r\n\r\nAnd then I compile it:\r\n```\r\n$ npm install -g browserify\r\n$ browserify test.js > bundle.js\r\n```\r\n\r\nAnd then I include it in a simple HTML page:\r\n\r\n``` html\r\n<!DOCTYPE html>\r\n<script src=\"bundle.js\"></script>\r\n```\r\n\r\nI get the following errors in Chrome:\r\n\r\n```\r\nUncaught Error: Cannot find module '/node_modules/paralleljs/lib/Worker.js' bundle.js:1\r\ns bundle.js:1\r\n(anonymous function) bundle.js:1\r\n(anonymous function) bundle.js:54\r\nos bundle.js:358\r\ns bundle.js:1\r\n(anonymous function) bundle.js:1\r\nparalleljs bundle.js:360\r\ns bundle.js:1\r\ne bundle.js:1\r\n(anonymous function)\r\n```\r\n\r\nI know you can just include parallels directly as a script tag, but would be nice to use this within browserify."},"comment":{"url":"https://api.github.com/repos/adambom/parallel.js/issues/comments/156679988","html_url":"https://github.com/adambom/parallel.js/issues/56#issuecomment-156679988","issue_url":"https://api.github.com/repos/adambom/parallel.js/issues/56","id":156679988,"user":{"login":"flaszer","id":5042538,"avatar_url":"https://avatars.githubusercontent.com/u/5042538?v=3","gravatar_id":"","url":"https://api.github.com/users/flaszer","html_url":"https://github.com/flaszer","followers_url":"https://api.github.com/users/flaszer/followers","following_url":"https://api.github.com/users/flaszer/following{/other_user}","gists_url":"https://api.github.com/users/flaszer/gists{/gist_id}","starred_url":"https://api.github.com/users/flaszer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flaszer/subscriptions","organizations_url":"https://api.github.com/users/flaszer/orgs","repos_url":"https://api.github.com/users/flaszer/repos","events_url":"https://api.github.com/users/flaszer/events{/privacy}","received_events_url":"https://api.github.com/users/flaszer/received_events","type":"User","site_admin":false},"created_at":"2015-11-14T10:01:13Z","updated_at":"2015-11-14T10:01:13Z","body":"Got exactly the same issue - tested on Chrome."}}