{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular-cli/issues/8444","repository_url":"https://api.github.com/repos/angular/angular-cli","labels_url":"https://api.github.com/repos/angular/angular-cli/issues/8444/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular-cli/issues/8444/comments","events_url":"https://api.github.com/repos/angular/angular-cli/issues/8444/events","html_url":"https://github.com/angular/angular-cli/issues/8444","id":273003149,"node_id":"MDU6SXNzdWUyNzMwMDMxNDk=","number":8444,"title":"build on angular 5 with errors for production but developer mode works fine","user":{"login":"Widrogo","id":3698485,"node_id":"MDQ6VXNlcjM2OTg0ODU=","avatar_url":"https://avatars1.githubusercontent.com/u/3698485?v=4","gravatar_id":"","url":"https://api.github.com/users/Widrogo","html_url":"https://github.com/Widrogo","followers_url":"https://api.github.com/users/Widrogo/followers","following_url":"https://api.github.com/users/Widrogo/following{/other_user}","gists_url":"https://api.github.com/users/Widrogo/gists{/gist_id}","starred_url":"https://api.github.com/users/Widrogo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Widrogo/subscriptions","organizations_url":"https://api.github.com/users/Widrogo/orgs","repos_url":"https://api.github.com/users/Widrogo/repos","events_url":"https://api.github.com/users/Widrogo/events{/privacy}","received_events_url":"https://api.github.com/users/Widrogo/received_events","type":"User","site_admin":false},"labels":[{"id":957896443,"node_id":"MDU6TGFiZWw5NTc4OTY0NDM=","url":"https://api.github.com/repos/angular/angular-cli/labels/comp:%20devkit/build-angular","name":"comp: devkit/build-angular","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-11-10T17:20:53Z","updated_at":"2018-07-05T14:45:56Z","closed_at":null,"author_association":"NONE","body":"### Bug Report or Feature Request (mark with an `x`)\r\n\r\n- [x] bug report -> please search issues before submitting\r\n- [ ] feature request\r\n\r\n### Versions.\r\n\r\nAngular CLI: 1.5.0\r\nNode: 8.9.1\r\nOS: win32 x64\r\nAngular: 5.0.1\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... http, language-service, platform-browser\r\n... platform-browser-dynamic, router\r\n\r\nangular/cli: 1.5.0\r\nangular-devkit/build-optimizer: 0.0.32\r\nangular-devkit/core: 0.0.20\r\nangular-devkit/schematics: 0.0.35\r\nngtools/json-schema: 1.1.0\r\nngtools/webpack: 1.8.0\r\nschematics/angular: 0.1.2\r\ntypescript: 2.4.2\r\nwebpack: 3.8.1\r\n\r\n### Repro steps.\r\nhttps://github.com/Widrogo/cakephp3-angular5\r\n\r\nThe project is quite new I just put a template, change what is necessary to use it with angular 5 and with ng serve me it runs without any error.\r\n\r\nWhen I made the build for production it generates errors, it is because I use a modified modernizr script cakephp3-angular5/src/assets/js/modernizr.custom.32033.js it is just declared on angular-cli.json\r\n\r\n>Uncaught TypeError: Cannot read property 'html5' of undefined\r\n>    at scripts.b43496ed343a01b5b3b7.bundle.js:11\r\n>    at scripts.b43496ed343a01b5b3b7.bundle.js:11\r\n>    at scripts.b43496ed343a01b5b3b7.bundle.js:11\r\n\r\nI'm sure that the build causes problems because this is the only file that I handle html5 and debugging is the error here when I run the build.\r\n\r\n\r\nFor build test with different commands:\r\n\r\n\r\nng build --prod\r\nng build --prod --aot\r\nng build --prod --aot\r\n ng build --prod --aot --base-href ./\r\n\r\nAnd test the app with this:\r\nng serve --prod\r\ngive the same error that build for produccion\r\n\r\n### The log given by the failure.\r\n\r\n### Desired functionality.\r\n\r\nI just want the build to work or production mode where it fails\r\n\r\n### Mention any other details that might be useful.\r\nI'm using a modernzr modefied\r\nhttps://stackoverflow.com/questions/47226546/modernizr-with-the-build-on-angular-5\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular-cli/issues/comments/402746855","html_url":"https://github.com/angular/angular-cli/issues/8444#issuecomment-402746855","issue_url":"https://api.github.com/repos/angular/angular-cli/issues/8444","id":402746855,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjc0Njg1NQ==","user":{"login":"ohabash","id":15847500,"node_id":"MDQ6VXNlcjE1ODQ3NTAw","avatar_url":"https://avatars3.githubusercontent.com/u/15847500?v=4","gravatar_id":"","url":"https://api.github.com/users/ohabash","html_url":"https://github.com/ohabash","followers_url":"https://api.github.com/users/ohabash/followers","following_url":"https://api.github.com/users/ohabash/following{/other_user}","gists_url":"https://api.github.com/users/ohabash/gists{/gist_id}","starred_url":"https://api.github.com/users/ohabash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ohabash/subscriptions","organizations_url":"https://api.github.com/users/ohabash/orgs","repos_url":"https://api.github.com/users/ohabash/repos","events_url":"https://api.github.com/users/ohabash/events{/privacy}","received_events_url":"https://api.github.com/users/ohabash/received_events","type":"User","site_admin":false},"created_at":"2018-07-05T14:45:56Z","updated_at":"2018-07-05T14:45:56Z","author_association":"NONE","body":"I found out that there are extra tests during the prod build. I just started compiling more often. but here is more details about what worked for me. https://stackoverflow.com/questions/50337954/angular-5-ng-build-shows-no-errors-ng-build-prod-has-many-errors\r\n"}}
{"actor":{"display_login":"ohabash"}}