{"action":"closed","issue":{"url":"https://api.github.com/repos/angular/angular-cli/issues/2538","repository_url":"https://api.github.com/repos/angular/angular-cli","labels_url":"https://api.github.com/repos/angular/angular-cli/issues/2538/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular-cli/issues/2538/comments","events_url":"https://api.github.com/repos/angular/angular-cli/issues/2538/events","html_url":"https://github.com/angular/angular-cli/issues/2538","id":181300739,"number":2538,"title":"ng build: specifying output path explicitly breaks aot","user":{"login":"Meligy","id":171637,"avatar_url":"https://avatars.githubusercontent.com/u/171637?v=3","gravatar_id":"","url":"https://api.github.com/users/Meligy","html_url":"https://github.com/Meligy","followers_url":"https://api.github.com/users/Meligy/followers","following_url":"https://api.github.com/users/Meligy/following{/other_user}","gists_url":"https://api.github.com/users/Meligy/gists{/gist_id}","starred_url":"https://api.github.com/users/Meligy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Meligy/subscriptions","organizations_url":"https://api.github.com/users/Meligy/orgs","repos_url":"https://api.github.com/users/Meligy/repos","events_url":"https://api.github.com/users/Meligy/events{/privacy}","received_events_url":"https://api.github.com/users/Meligy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular-cli/labels/command:%20build","name":"command: build","color":"c7def8"},{"url":"https://api.github.com/repos/angular/angular-cli/labels/need:%20more%20info","name":"need: more info","color":"fbca04"},{"url":"https://api.github.com/repos/angular/angular-cli/labels/priority:%201%20(urgent)","name":"priority: 1 (urgent)","color":"0052cc"},{"url":"https://api.github.com/repos/angular/angular-cli/labels/type:%20bug","name":"type: bug","color":"EEEEEE"}],"state":"closed","locked":false,"assignee":{"login":"filipesilva","id":4172079,"avatar_url":"https://avatars.githubusercontent.com/u/4172079?v=3","gravatar_id":"","url":"https://api.github.com/users/filipesilva","html_url":"https://github.com/filipesilva","followers_url":"https://api.github.com/users/filipesilva/followers","following_url":"https://api.github.com/users/filipesilva/following{/other_user}","gists_url":"https://api.github.com/users/filipesilva/gists{/gist_id}","starred_url":"https://api.github.com/users/filipesilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipesilva/subscriptions","organizations_url":"https://api.github.com/users/filipesilva/orgs","repos_url":"https://api.github.com/users/filipesilva/repos","events_url":"https://api.github.com/users/filipesilva/events{/privacy}","received_events_url":"https://api.github.com/users/filipesilva/received_events","type":"User","site_admin":false},"assignees":[{"login":"filipesilva","id":4172079,"avatar_url":"https://avatars.githubusercontent.com/u/4172079?v=3","gravatar_id":"","url":"https://api.github.com/users/filipesilva","html_url":"https://github.com/filipesilva","followers_url":"https://api.github.com/users/filipesilva/followers","following_url":"https://api.github.com/users/filipesilva/following{/other_user}","gists_url":"https://api.github.com/users/filipesilva/gists{/gist_id}","starred_url":"https://api.github.com/users/filipesilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipesilva/subscriptions","organizations_url":"https://api.github.com/users/filipesilva/orgs","repos_url":"https://api.github.com/users/filipesilva/repos","events_url":"https://api.github.com/users/filipesilva/events{/privacy}","received_events_url":"https://api.github.com/users/filipesilva/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2016-10-06T00:49:26Z","updated_at":"2016-10-11T12:46:23Z","closed_at":"2016-10-11T12:46:23Z","body":"> Please provide us with the following information:\r\n> ---------------------------------------------------------------\r\n\r\n### OS?\r\n> Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)\r\n\r\nWindows 8.1 x64\r\n\r\n### Versions.\r\n> Please run `ng --version`. If there's nothing outputted, please run in a Terminal: `node --version` and paste the result here:\r\n\r\n```\r\nangular-cli: 1.0.0-beta.16\r\nnode: 4.4.2\r\nos: win32 x64\r\n```\r\n\r\n### Repro steps.\r\n> Was this an app that wasn't created using the CLI? What change did you do on your code? etc.\r\n\r\nA pretty fresh app created by CLI\r\n\r\n`ng build -prod --aot` works\r\n\r\n`ng build -o dist -prod --aot` breaks\r\n\r\n``\r\n\r\n### The log given by the failure.\r\n> Normally this include a stack trace and some more information.\r\n\r\nOutput\r\n\r\n```\r\n 12% building modules 19/29 modules 10 active ...tform-browser\\src\\platform-browser.jsModuleNotFoundError: Module not found: Error: Can't resolve './../D:/client/dist/ngfactory/src/app/app.module.ngfactory' in 'D:\\client\\src'\r\n    at D:\\client\\node_modules\\webpack\\lib\\Compilation.js:229:38\r\n    at onDoneResolving (D:\\client\\node_modules\\webpack\\lib\\NormalModuleFactory.js:29:20)\r\n    at D:\\client\\node_modules\\webpack\\lib\\NormalModuleFactory.js:94:20\r\n    at D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:726:13\r\n    at D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:52:16\r\n    at done (D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:241:17)\r\n    at D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:44:16\r\n    at D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:723:17\r\n    at D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:167:37\r\n    at D:\\client\\node_modules\\webpack\\lib\\NormalModuleFactory.js:89:22\r\n    at onResolved (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:70:11)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at afterInnerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:138:10)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at Resolver.applyPluginsAsyncSeriesBailResult1 (D:\\client\\node_modules\\tapable\\lib\\Tapable.js:108:46)\r\n    at innerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:125:19)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at D:\\client\\node_modules\\tapable\\lib\\Tapable.js:210:15\r\n    at D:\\client\\node_modules\\enhanced-resolve\\lib\\UnsafeCachePlugin.js:39:4\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at afterInnerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:138:10)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at Resolver.applyPluginsAsyncSeriesBailResult1 (D:\\client\\node_modules\\tapable\\lib\\Tapable.js:108:46)\r\n    at innerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:125:19)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at D:\\client\\node_modules\\tapable\\lib\\Tapable.js:210:15\r\n    at innerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:123:11)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at D:\\client\\node_modules\\tapable\\lib\\Tapable.js:210:15\r\n    at D:\\client\\node_modules\\enhanced-resolve\\lib\\DescriptionFilePlugin.js:45:5\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at afterInnerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:138:10)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at next (D:\\client\\node_modules\\tapable\\lib\\Tapable.js:115:11)\r\n    at innerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:123:11)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at D:\\client\\node_modules\\tapable\\lib\\Tapable.js:210:15\r\n    at D:\\client\\node_modules\\enhanced-resolve\\lib\\DescriptionFilePlugin.js:45:5\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at afterInnerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:138:10)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at Resolver.applyPluginsAsyncSeriesBailResult1 (D:\\client\\node_modules\\tapable\\lib\\Tapable.js:108:46)\r\n    at innerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:125:19)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at D:\\client\\node_modules\\tapable\\lib\\Tapable.js:210:15\r\n    at afterInnerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:138:10)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at Resolver.applyPluginsAsyncSeriesBailResult1 (D:\\client\\node_modules\\tapable\\lib\\Tapable.js:108:46)\r\n    at innerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:125:19)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at D:\\client\\node_modules\\tapable\\lib\\Tapable.js:210:15\r\n    at afterInnerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:138:10)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at Resolver.applyPluginsAsyncSeriesBailResult1 (D:\\client\\node_modules\\tapable\\lib\\Tapable.js:108:46)\r\n    at innerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:125:19)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at D:\\client\\node_modules\\tapable\\lib\\Tapable.js:210:15\r\n    at Resolver.<anonymous> (D:\\client\\node_modules\\enhanced-resolve\\lib\\FileExistsPlugin.js:23:12)\r\n    at Storage.finished (D:\\client\\node_modules\\enhanced-resolve\\lib\\CachedInputFileSystem.js:39:16)\r\n    at D:\\client\\node_modules\\enhanced-resolve\\node_modules\\graceful-fs\\polyfills.js:264:29\r\n    at FSReqWrap.oncomplete (fs.js:82:15)\r\nresolve './../D:/client/dist/ngfactory/src/app/app.module.ngfactory' in 'D:\\client\\src'\r\n  using description file: D:\\client\\package.json (relative path: ./src)\r\n    Field 'browser' doesn't contain a valid alias configuration\r\n  after using description file: D:\\client\\package.json (relative path: ./src)\r\n    using description file: D:\\client\\package.json (relative path: ./D:/client/dist/ngfactory/src/app/app.module.ngfactory)\r\n      as directory\r\n        D:\\client\\D:\\client\\dist\\ngfactory\\src\\app\\app.module.ngfactory doesn't exist\r\n      no extension\r\n        Field 'browser' doesn't contain a valid alias configuration\r\n        D:\\client\\D:\\client\\dist\\ngfactory\\src\\app\\app.module.ngfactory doesn't exist\r\n      Field 'browser' doesn't contain a valid alias configuration\r\n      D:\\client\\D:\\client\\dist\\ngfactory\\src\\app\\app.module.ngfactory doesn't exist\r\n      .ts\r\n        Field 'browser' doesn't contain a valid alias configuration\r\n        D:\\client\\D:\\client\\dist\\ngfactory\\src\\app\\app.module.ngfactory.ts doesn't exist\r\n      .js\r\n        Field 'browser' doesn't contain a valid alias configuration\r\n        D:\\client\\D:\\client\\dist\\ngfactory\\src\\app\\app.module.ngfactory.js doesn't exist\r\n\r\nD:\\client\\node_modules\\webpack\\lib\\Compiler.js:192\r\n                                        if(err) return callback(err);\r\n                    ^\r\nTypeError: Cannot read property 'hash' of undefined\r\n    at D:\\client\\node_modules\\angular-cli\\tasks\\build-webpack.js:38:26\r\n    at Compiler.onCompiled (D:\\client\\node_modules\\webpack\\lib\\Compiler.js:192:21)\r\n    at Compiler.<anonymous> (D:\\client\\node_modules\\webpack\\lib\\Compiler.js:432:18)\r\n    at D:\\client\\node_modules\\tapable\\lib\\Tapable.js:148:11\r\n    at Compilation.<anonymous> (D:\\client\\node_modules\\webpack\\lib\\Compilation.js:435:11)\r\n    at D:\\client\\node_modules\\webpack\\lib\\Compilation.js:417:13\r\n    at D:\\client\\node_modules\\webpack\\lib\\Compilation.js:329:11\r\n    at D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:52:16\r\n    at done (D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:241:17)\r\n    at D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:44:16\r\n    at D:\\client\\node_modules\\webpack\\lib\\Compilation.js:329:11\r\n    at D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:52:16\r\n    at done (D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:241:17)\r\n    at D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:44:16\r\n    at errorAndCallback (D:\\client\\node_modules\\webpack\\lib\\Compilation.js:199:5)\r\n    at errorOrWarningAndCallback (D:\\client\\node_modules\\webpack\\lib\\Compilation.js:225:13)\r\n    at D:\\client\\node_modules\\webpack\\lib\\Compilation.js:229:12\r\n    at onDoneResolving (D:\\client\\node_modules\\webpack\\lib\\NormalModuleFactory.js:29:20)\r\n    at D:\\client\\node_modules\\webpack\\lib\\NormalModuleFactory.js:94:20\r\n    at D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:726:13\r\n    at D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:52:16\r\n    at done (D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:241:17)\r\n    at D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:44:16\r\n    at D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:723:17\r\n    at D:\\client\\node_modules\\webpack\\node_modules\\async\\lib\\async.js:167:37\r\n    at D:\\client\\node_modules\\webpack\\lib\\NormalModuleFactory.js:89:22\r\n    at onResolved (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:70:11)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at afterInnerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:138:10)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at Resolver.applyPluginsAsyncSeriesBailResult1 (D:\\client\\node_modules\\tapable\\lib\\Tapable.js:108:46)\r\n    at innerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:125:19)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at D:\\client\\node_modules\\tapable\\lib\\Tapable.js:210:15\r\n    at D:\\client\\node_modules\\enhanced-resolve\\lib\\UnsafeCachePlugin.js:39:4\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at afterInnerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:138:10)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at Resolver.applyPluginsAsyncSeriesBailResult1 (D:\\client\\node_modules\\tapable\\lib\\Tapable.js:108:46)\r\n    at innerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:125:19)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at D:\\client\\node_modules\\tapable\\lib\\Tapable.js:210:15\r\n    at innerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:123:11)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at D:\\client\\node_modules\\tapable\\lib\\Tapable.js:210:15\r\n    at D:\\client\\node_modules\\enhanced-resolve\\lib\\DescriptionFilePlugin.js:45:5\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at afterInnerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:138:10)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at next (D:\\client\\node_modules\\tapable\\lib\\Tapable.js:115:11)\r\n    at innerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:123:11)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at D:\\client\\node_modules\\tapable\\lib\\Tapable.js:210:15\r\n    at D:\\client\\node_modules\\enhanced-resolve\\lib\\DescriptionFilePlugin.js:45:5\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at afterInnerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:138:10)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at Resolver.applyPluginsAsyncSeriesBailResult1 (D:\\client\\node_modules\\tapable\\lib\\Tapable.js:108:46)\r\n    at innerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:125:19)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at D:\\client\\node_modules\\tapable\\lib\\Tapable.js:210:15\r\n    at afterInnerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:138:10)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at Resolver.applyPluginsAsyncSeriesBailResult1 (D:\\client\\node_modules\\tapable\\lib\\Tapable.js:108:46)\r\n    at innerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:125:19)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at D:\\client\\node_modules\\tapable\\lib\\Tapable.js:210:15\r\n    at afterInnerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:138:10)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at Resolver.applyPluginsAsyncSeriesBailResult1 (D:\\client\\node_modules\\tapable\\lib\\Tapable.js:108:46)\r\n    at innerCallback (D:\\client\\node_modules\\enhanced-resolve\\lib\\Resolver.js:125:19)\r\n    at loggingCallbackWrapper (D:\\client\\node_modules\\enhanced-resolve\\lib\\createInnerCallback.js:31:19)\r\n    at D:\\client\\node_modules\\tapable\\lib\\Tapable.js:210:15\r\n    at Resolver.<anonymous> (D:\\client\\node_modules\\enhanced-resolve\\lib\\FileExistsPlugin.js:23:12)\r\n    at Storage.finished (D:\\client\\node_modules\\enhanced-resolve\\lib\\CachedInputFileSystem.js:39:16)\r\n    at D:\\client\\node_modules\\enhanced-resolve\\node_modules\\graceful-fs\\polyfills.js:264:29\r\n    at FSReqWrap.oncomplete (fs.js:82:15)\r\n```\r\n\r\nWith the project created at `D:\\client` in that case (actual path shortened to not include private info, it takes forever to redo npm install on the current network to run another `ng new`).\r\n\r\n### Mention any other details that might be useful.\r\n\r\nNote that I didn't even change the folder, I started setting outDir explicitly in my scripts because of #2511.\r\n\r\n> ---------------------------------------------------------------\r\n> Thanks! We'll be in touch soon."}}
{"actor":{"display_login":"Meligy"}}