{"action":"created","issue":{"url":"https://api.github.com/repos/rollup/rollup/issues/554","repository_url":"https://api.github.com/repos/rollup/rollup","labels_url":"https://api.github.com/repos/rollup/rollup/issues/554/labels{/name}","comments_url":"https://api.github.com/repos/rollup/rollup/issues/554/comments","events_url":"https://api.github.com/repos/rollup/rollup/issues/554/events","html_url":"https://github.com/rollup/rollup/issues/554","id":140494279,"number":554,"title":"Bundle is built without errors, but running the bundle results in a variable being undefined","user":{"login":"petetnt","id":7641760,"avatar_url":"https://avatars.githubusercontent.com/u/7641760?v=3","gravatar_id":"","url":"https://api.github.com/users/petetnt","html_url":"https://github.com/petetnt","followers_url":"https://api.github.com/users/petetnt/followers","following_url":"https://api.github.com/users/petetnt/following{/other_user}","gists_url":"https://api.github.com/users/petetnt/gists{/gist_id}","starred_url":"https://api.github.com/users/petetnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petetnt/subscriptions","organizations_url":"https://api.github.com/users/petetnt/orgs","repos_url":"https://api.github.com/users/petetnt/repos","events_url":"https://api.github.com/users/petetnt/events{/privacy}","received_events_url":"https://api.github.com/users/petetnt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-13T15:11:37Z","updated_at":"2016-03-13T18:57:09Z","closed_at":null,"body":"Sorry if this report is a bit vague, but I am trying to build a bundle that's gets passed though various plugins. Bundle is built but running it results on following:\r\n\r\n``` js\r\nvar permuteDomain$1 = permuteDomain$1.permuteDomain;\r\n                                     ^\r\n\r\nTypeError: Cannot read property 'permuteDomain' of undefined\r\n    at Object.<anonymous> (D:\\foo.js:17718:38)\r\n    at Module._compile (module.js:425:26)\r\n    at Object.Module._extensions..js (module.js:432:10)\r\n    at Module.load (module.js:356:32)\r\n    at Function.Module._load (module.js:313:12)\r\n    at Function.Module.runMain (module.js:457:10)\r\n    at startup (node.js:138:18)\r\n    at node.js:974:3\r\n```\r\n\r\nThe file / module in question is this: https://github.com/SalesforceEng/tough-cookie/blob/master/lib/permuteDomain.js which is used by [request in slack-notify](https://github.com/andrewchilds/slack-notify).\r\n\r\nMy `rollup` function looks like this: I am not entirely sure if this is the correct way to approach this. First time using rollup, but my main goal is to have a standalone bundle that can be ran with Node with `#!/usr/bin/env node` (so a bundle with my code and `node_modules` included but without Node built-ins).\r\n\r\n``` js\r\n            rollup.rollup({\r\n                entry: \"foo.js\",\r\n                plugins: [\r\n                    nodeResolve({\r\n                        jsnext: true,\r\n                        main: true,\r\n                        extensions: ['.js'],\r\n                        preferBuiltins: true\r\n                    }),\r\n                    json(),\r\n                    commonJS({include: 'node_modules/**'}),\r\n                    babel()\r\n                ]\r\n            }).then(function (bundle) {\r\n                return bundle.write({\r\n                    format: 'cjs',\r\n                    dest: \"bar.js\",\r\n                    banner: \"#!/usr/bin/env node\"\r\n                })                      \r\n            }).then(resolve).catch(reject);\r\n```\r\n\r\nAnything I should be looking into or is something definitely wrong here?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rollup/rollup/issues/comments/196020752","html_url":"https://github.com/rollup/rollup/issues/554#issuecomment-196020752","issue_url":"https://api.github.com/repos/rollup/rollup/issues/554","id":196020752,"user":{"login":"petetnt","id":7641760,"avatar_url":"https://avatars.githubusercontent.com/u/7641760?v=3","gravatar_id":"","url":"https://api.github.com/users/petetnt","html_url":"https://github.com/petetnt","followers_url":"https://api.github.com/users/petetnt/followers","following_url":"https://api.github.com/users/petetnt/following{/other_user}","gists_url":"https://api.github.com/users/petetnt/gists{/gist_id}","starred_url":"https://api.github.com/users/petetnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petetnt/subscriptions","organizations_url":"https://api.github.com/users/petetnt/orgs","repos_url":"https://api.github.com/users/petetnt/repos","events_url":"https://api.github.com/users/petetnt/events{/privacy}","received_events_url":"https://api.github.com/users/petetnt/received_events","type":"User","site_admin":false},"created_at":"2016-03-13T18:57:09Z","updated_at":"2016-03-13T18:57:09Z","body":"Possibly related to this plugin issue? https://github.com/rollup/rollup-plugin-commonjs/issues/35 \r\n\r\n(Named) reporting occuring here: https://github.com/SalesforceEng/tough-cookie/blob/a44dcfecc46b72f8e1c5f843052046efb7eb8681/lib/cookie.js#L1325"}}