{"action":"created","issue":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/1802","repository_url":"https://api.github.com/repos/jspm/jspm-cli","labels_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1802/labels{/name}","comments_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1802/comments","events_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1802/events","html_url":"https://github.com/jspm/jspm-cli/issues/1802","id":154168833,"number":1802,"title":"\"Uncaught ReferenceError: System is not defined\" with static builds","user":{"login":"jithin1987","id":193126,"avatar_url":"https://avatars.githubusercontent.com/u/193126?v=3","gravatar_id":"","url":"https://api.github.com/users/jithin1987","html_url":"https://github.com/jithin1987","followers_url":"https://api.github.com/users/jithin1987/followers","following_url":"https://api.github.com/users/jithin1987/following{/other_user}","gists_url":"https://api.github.com/users/jithin1987/gists{/gist_id}","starred_url":"https://api.github.com/users/jithin1987/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jithin1987/subscriptions","organizations_url":"https://api.github.com/users/jithin1987/orgs","repos_url":"https://api.github.com/users/jithin1987/repos","events_url":"https://api.github.com/users/jithin1987/events{/privacy}","received_events_url":"https://api.github.com/users/jithin1987/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-11T06:25:45Z","updated_at":"2016-05-17T01:32:32Z","closed_at":null,"body":"I am on JSPM v0.17 latest beta. I have a line `System.register` in the static build which is causing the error\r\n\r\nFrom the minified file via `jspm build src/main public/js/build-min.js --minify;`\r\n```\r\n    a.register(\"14a\", [], function() {\r\n        return {\r\n            setters: [],\r\n            execute: function() {}\r\n        }\r\n    }),\r\n    System.register(\"1\", [\"3\", \"51\", \"52\", \"61\", \"62\", \"63\", \"64\", \"65\", \"66\", \"67\", \"68\", \"69\", \"89\", \"97\", \"98\", \"148\", \"149\", \"9f\", \"3e\", \"6a\", \"6b\", \"8a\", \"6c\", \"9e\", \"a4\", \"a0\", \"a1\", \"a2\", \"a3\", \"a5\", \"a6\", \"14a\"], function(a, b) {\r\n        function c(a, b) {\r\n\r\n````\r\n\r\nIf I manually replace `System.register` with `a.register` then the static build works. I am not able to create a test repo for this because of https://github.com/jspm/jspm-cli/issues/1774\r\n\r\nHowever on following stack trace I believe it's caused by `react-chartjs`. So I tried removing `react-chartjs`, but got same error on `react-select`. Could be that these packages use commonjs modules.\r\n\r\nThis seems to be similar to an old issue https://github.com/jspm/jspm-cli/issues/1032 "},"comment":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/comments/219596467","html_url":"https://github.com/jspm/jspm-cli/issues/1802#issuecomment-219596467","issue_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1802","id":219596467,"user":{"login":"jithin1987","id":193126,"avatar_url":"https://avatars.githubusercontent.com/u/193126?v=3","gravatar_id":"","url":"https://api.github.com/users/jithin1987","html_url":"https://github.com/jithin1987","followers_url":"https://api.github.com/users/jithin1987/followers","following_url":"https://api.github.com/users/jithin1987/following{/other_user}","gists_url":"https://api.github.com/users/jithin1987/gists{/gist_id}","starred_url":"https://api.github.com/users/jithin1987/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jithin1987/subscriptions","organizations_url":"https://api.github.com/users/jithin1987/orgs","repos_url":"https://api.github.com/users/jithin1987/repos","events_url":"https://api.github.com/users/jithin1987/events{/privacy}","received_events_url":"https://api.github.com/users/jithin1987/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T01:32:32Z","updated_at":"2016-05-17T01:32:32Z","body":"Module 1 is the `main` module (starting point of my app) in this command `jspm build src/main public/js/build.js;` "}}