{"action":"created","issue":{"url":"https://api.github.com/repos/google/closure-compiler-js/issues/23","repository_url":"https://api.github.com/repos/google/closure-compiler-js","labels_url":"https://api.github.com/repos/google/closure-compiler-js/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/google/closure-compiler-js/issues/23/comments","events_url":"https://api.github.com/repos/google/closure-compiler-js/issues/23/events","html_url":"https://github.com/google/closure-compiler-js/issues/23","id":177256145,"number":23,"title":"Node process runs out of memory","user":{"login":"thelgevold","id":349548,"avatar_url":"https://avatars.githubusercontent.com/u/349548?v=3","gravatar_id":"","url":"https://api.github.com/users/thelgevold","html_url":"https://github.com/thelgevold","followers_url":"https://api.github.com/users/thelgevold/followers","following_url":"https://api.github.com/users/thelgevold/following{/other_user}","gists_url":"https://api.github.com/users/thelgevold/gists{/gist_id}","starred_url":"https://api.github.com/users/thelgevold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelgevold/subscriptions","organizations_url":"https://api.github.com/users/thelgevold/orgs","repos_url":"https://api.github.com/users/thelgevold/repos","events_url":"https://api.github.com/users/thelgevold/events{/privacy}","received_events_url":"https://api.github.com/users/thelgevold/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-09-15T18:42:52Z","updated_at":"2016-09-19T14:53:22Z","closed_at":null,"body":"I have been trying to integrate the JavaScript version of the Closure compiler with my application as a Rollup plugin. \r\nThe process works for simple projects, but I have observed that the process runs out of memory in bigger projects:\r\n\r\nThe process runs for a while, but crashes eventually with the error message:\r\n```\r\n<--- Last few GCs --->\r\n\r\n  245503 ms: Mark-sweep 13967.5 (14023.0) -> 13966.5 (14023.0) MB, 14259.4 / 0 ms [allocation failure] [GC in old space requested].\r\n  262655 ms: Mark-sweep 13966.5 (14023.0) -> 13966.5 (14023.0) MB, 17154.0 / 0 ms [allocation failure] [GC in old space requested].\r\n  280443 ms: Mark-sweep 13966.5 (14023.0) -> 13966.4 (14023.0) MB, 17789.0 / 0 ms [last resort gc].\r\n  298983 ms: Mark-sweep 13966.4 (14023.0) -> 13966.4 (14023.0) MB, 18541.4 / 0 ms [last resort gc].\r\n\r\n\r\n<--- JS stacktrace --->\r\n\r\n==== JS stack trace =========================================\r\n\r\nSecurity context: 0x298b1a5b4629 <JS Object>\r\n    1: qhb(aka qhb) [/Users/helgevot/temp/angular-2-samples/node_modules/google-closure-compiler-js/jscomp.js:~4620] [pc=0x1f9c9b11dbc4] (this=0x298b1a5041b9 <undefined>,a=0x178543a1ed51 <a uhb with map 0x1bcd61950b81>,b=0x71dd11e34f1 <a thb with map 0x1bcd61951209>)\r\n    2: aec [/Users/helgevot/temp/angular-2-samples/node_modules/google-closure-compiler-js/jscomp.js:6280] [pc=0x1f9c9b110535] (t...\r\n\r\nFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory\r\nsh: line 1: 19438 Abort trap: 6           npm run rollup\r\n\r\n\r\n```\r\nHere is my rollup code that integrates the `\"google-closure-compiler-js\": \"^20160828.0.1\"` package\r\n\r\n```\r\nvar closure = require('google-closure-compiler-js');\r\n\r\nfunction closureCompilerPlugin(){\r\n  return {\r\n    transformBundle(bundle){\r\n      var transformed = closure.compile({jsCode: [{src: bundle}]});\r\n      return transformed.compiledCode;\r\n    }\r\n  }\r\n}\r\n\r\nexport default {\r\n    entry: 'main.js',\r\n    dest: 'dist/bundle.js',\r\n    sourceMap: false,\r\n    format: 'iife',\r\n    plugins: [\r\n        commonjs({\r\n            include: 'node_modules/rxjs/**',\r\n        }),\r\n        nodeResolve({\r\n            jsnext: true, module: true\r\n        }),\r\n        closureCompilerPlugin()\r\n    ]\r\n\r\n}\r\n```\r\n\r\nI think the Java version will work, but I would really like to get this working with the JS version since the setup is so much simpler."},"comment":{"url":"https://api.github.com/repos/google/closure-compiler-js/issues/comments/248016364","html_url":"https://github.com/google/closure-compiler-js/issues/23#issuecomment-248016364","issue_url":"https://api.github.com/repos/google/closure-compiler-js/issues/23","id":248016364,"user":{"login":"concavelenz","id":1245994,"avatar_url":"https://avatars.githubusercontent.com/u/1245994?v=3","gravatar_id":"","url":"https://api.github.com/users/concavelenz","html_url":"https://github.com/concavelenz","followers_url":"https://api.github.com/users/concavelenz/followers","following_url":"https://api.github.com/users/concavelenz/following{/other_user}","gists_url":"https://api.github.com/users/concavelenz/gists{/gist_id}","starred_url":"https://api.github.com/users/concavelenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concavelenz/subscriptions","organizations_url":"https://api.github.com/users/concavelenz/orgs","repos_url":"https://api.github.com/users/concavelenz/repos","events_url":"https://api.github.com/users/concavelenz/events{/privacy}","received_events_url":"https://api.github.com/users/concavelenz/received_events","type":"User","site_admin":false},"created_at":"2016-09-19T14:53:22Z","updated_at":"2016-09-19T14:53:22Z","body":"yes, what values did you try?\n\nOn Sun, Sep 18, 2016 at 10:51 AM, Torgeir Helgevold <\nnotifications@github.com> wrote:\n\n> @concavelenz <https://github.com/concavelenz> I am not 100% sure what you\n> mean. I have tried setting max_old_space_size. Is that what you're\n> referring to?\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/google/closure-compiler-js/issues/23#issuecomment-247862371>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ABMDKj155dG8IyLrFFkHddBbdd_TwFbyks5qrXo8gaJpZM4J-NVW>\n> .\n>\n"}}
{"actor":{"display_login":"concavelenz"}}