{"action":"created","issue":{"url":"https://api.github.com/repos/mgechev/angular-seed/issues/1457","repository_url":"https://api.github.com/repos/mgechev/angular-seed","labels_url":"https://api.github.com/repos/mgechev/angular-seed/issues/1457/labels{/name}","comments_url":"https://api.github.com/repos/mgechev/angular-seed/issues/1457/comments","events_url":"https://api.github.com/repos/mgechev/angular-seed/issues/1457/events","html_url":"https://github.com/mgechev/angular-seed/issues/1457","id":182216250,"number":1457,"title":"Making changes to template breaks app","user":{"login":"enorfelt","id":8871328,"avatar_url":"https://avatars.githubusercontent.com/u/8871328?v=3","gravatar_id":"","url":"https://api.github.com/users/enorfelt","html_url":"https://github.com/enorfelt","followers_url":"https://api.github.com/users/enorfelt/followers","following_url":"https://api.github.com/users/enorfelt/following{/other_user}","gists_url":"https://api.github.com/users/enorfelt/gists{/gist_id}","starred_url":"https://api.github.com/users/enorfelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enorfelt/subscriptions","organizations_url":"https://api.github.com/users/enorfelt/orgs","repos_url":"https://api.github.com/users/enorfelt/repos","events_url":"https://api.github.com/users/enorfelt/events{/privacy}","received_events_url":"https://api.github.com/users/enorfelt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mgechev/angular-seed/labels/discuss","name":"discuss","color":"5319e7"}],"state":"open","locked":false,"assignee":{"login":"mgechev","id":455023,"avatar_url":"https://avatars.githubusercontent.com/u/455023?v=3","gravatar_id":"","url":"https://api.github.com/users/mgechev","html_url":"https://github.com/mgechev","followers_url":"https://api.github.com/users/mgechev/followers","following_url":"https://api.github.com/users/mgechev/following{/other_user}","gists_url":"https://api.github.com/users/mgechev/gists{/gist_id}","starred_url":"https://api.github.com/users/mgechev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgechev/subscriptions","organizations_url":"https://api.github.com/users/mgechev/orgs","repos_url":"https://api.github.com/users/mgechev/repos","events_url":"https://api.github.com/users/mgechev/events{/privacy}","received_events_url":"https://api.github.com/users/mgechev/received_events","type":"User","site_admin":false},"assignees":[{"login":"mgechev","id":455023,"avatar_url":"https://avatars.githubusercontent.com/u/455023?v=3","gravatar_id":"","url":"https://api.github.com/users/mgechev","html_url":"https://github.com/mgechev","followers_url":"https://api.github.com/users/mgechev/followers","following_url":"https://api.github.com/users/mgechev/following{/other_user}","gists_url":"https://api.github.com/users/mgechev/gists{/gist_id}","starred_url":"https://api.github.com/users/mgechev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgechev/subscriptions","organizations_url":"https://api.github.com/users/mgechev/orgs","repos_url":"https://api.github.com/users/mgechev/repos","events_url":"https://api.github.com/users/mgechev/events{/privacy}","received_events_url":"https://api.github.com/users/mgechev/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-10-11T09:27:11Z","updated_at":"2016-10-11T19:19:38Z","closed_at":null,"body":"I'm running the latest version (hopfully after upgrade) of seed. When I do a change in eg. home.component.html and after the live reload the app is broken with this error message: \r\n> localhost/:58 Error: (SystemJS) Unexpected token < in JSON at position 0(…) \"Report this er\r\n\r\nSteps to reproduce:\r\n\r\n1. npm start\r\n2. Make a change in home.component.html\r\n3. Save\r\n4. Wait for live reload\r\n\r\nCurrent behaviour\r\n> localhost/:58 Error: (SystemJS) Unexpected token < in JSON at position 0(…) \"Report this er\r\n\r\nIf I look into the file \"dist/dev/app/shared/config/env.config.js\" this is what is displayed:\r\n`\"use strict\";\r\nexports.Config = JSON.parse('<%= ENV_CONFIG %>');\r\n//# sourceMappingURL=env.config.js.map`\r\n\r\nExpected:\r\nExpected content in env.config.js:\r\n`\"use strict\";\r\nexports.Config = JSON.parse('{\"API\":\"https://demo.com\",\"APP_BASE\":\"/web/\",\"ENV\":\"DEV\"}');`\r\n\r\nOther info:\r\nIf I trigger a typescript file change then the json is evaluated and the problem is fixed.\r\n\r\n*UPDATE*\r\nI just tried this on a new clone and I can reproduce this issue. Just run the app and change something in home.component.html"},"comment":{"url":"https://api.github.com/repos/mgechev/angular-seed/issues/comments/253017174","html_url":"https://github.com/mgechev/angular-seed/issues/1457#issuecomment-253017174","issue_url":"https://api.github.com/repos/mgechev/angular-seed/issues/1457","id":253017174,"user":{"login":"enorfelt","id":8871328,"avatar_url":"https://avatars.githubusercontent.com/u/8871328?v=3","gravatar_id":"","url":"https://api.github.com/users/enorfelt","html_url":"https://github.com/enorfelt","followers_url":"https://api.github.com/users/enorfelt/followers","following_url":"https://api.github.com/users/enorfelt/following{/other_user}","gists_url":"https://api.github.com/users/enorfelt/gists{/gist_id}","starred_url":"https://api.github.com/users/enorfelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enorfelt/subscriptions","organizations_url":"https://api.github.com/users/enorfelt/orgs","repos_url":"https://api.github.com/users/enorfelt/repos","events_url":"https://api.github.com/users/enorfelt/events{/privacy}","received_events_url":"https://api.github.com/users/enorfelt/received_events","type":"User","site_admin":false},"created_at":"2016-10-11T19:19:38Z","updated_at":"2016-10-11T19:19:38Z","body":"Thats strange! Just tried on another computer right now with the same result.\r\nSteps:\r\n1. git clone --depth 1 https://github.com/mgechev/angular-seed.git\r\n2. cd angular-seed\r\n3. npm install\r\n4. tsc --project tsconfig.json (All ts files are compiled in tools folder)\r\n5. npm start (App runs without a problem)\r\n6. Change/Saved home.component.html\r\n7. App breaks with the same error. dist/dev/app/shared/config/env.config.js contains:\r\n`\"use strict\";\r\nexports.Config = JSON.parse('<%= ENV_CONFIG %>');\r\n//# sourceMappingURL=env.config.js.map`\r\n8. Changed/saved home.component.ts\r\n9. App compiles and reloads and the app works again. dist/dev/app/shared/config/env.config.js contains:\r\n`\"use strict\";\r\nexports.Config = JSON.parse('{\"API\":\"https://demo.com\",\"ENV\":\"DEV\"}');\r\n\r\n//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9zaGFyZWQvY29uZmlnL2Vudi5jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQU9hLGNBQU0sR0FBYyxJQUFJLENBQUMsS0FBSyxDQUFDLG1CQUFtQixDQUFDLENBQUMiLCJmaWxlIjoiYXBwL3NoYXJlZC9jb25maWcvZW52LmNvbmZpZy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIEZlZWwgZnJlZSB0byBleHRlbmQgdGhpcyBpbnRlcmZhY2VcclxuLy8gZGVwZW5kaW5nIG9uIHlvdXIgYXBwIHNwZWNpZmljIGNvbmZpZy5cclxuZXhwb3J0IGludGVyZmFjZSBFbnZDb25maWcge1xyXG4gIEFQST86IHN0cmluZztcclxuICBFTlY/OiBzdHJpbmc7XHJcbn1cclxuXHJcbmV4cG9ydCBjb25zdCBDb25maWc6IEVudkNvbmZpZyA9IEpTT04ucGFyc2UoJzwlPSBFTlZfQ09ORklHICU+Jyk7XHJcblxyXG4iXX0=`\r\n\r\nI have a feeling that the env.config.js is copied to output directory even though it has not changed.\r\nIf I look at the last modified date of dist/dev/app/shared/config/env.config.js it's the same time stamp as I saved the home.component.html file. So indeed it gets copied over.\r\n\r\nUsing:\r\nWindows 10\r\nVisual Studio Code 1.6.0\r\nPowershell (For compiling and running build/run tasks)\r\nNode version 5.7.0\r\nnpm version 3.6.0\r\n\r\nHelp or input is much appreciated :) Can I debug it some how?"}}
{"actor":{"display_login":"enorfelt"}}