{"action":"opened","issue":{"url":"https://api.github.com/repos/angular/angular/issues/23217","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/23217/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/23217/comments","events_url":"https://api.github.com/repos/angular/angular/issues/23217/events","html_url":"https://github.com/angular/angular/issues/23217","id":311865583,"number":23217,"title":"Regression: locales seem to be incorrect in 6.0.0-rc.2: ng serve fails to compile","user":{"login":"jnizet","id":1608223,"avatar_url":"https://avatars3.githubusercontent.com/u/1608223?v=4","gravatar_id":"","url":"https://api.github.com/users/jnizet","html_url":"https://github.com/jnizet","followers_url":"https://api.github.com/users/jnizet/followers","following_url":"https://api.github.com/users/jnizet/following{/other_user}","gists_url":"https://api.github.com/users/jnizet/gists{/gist_id}","starred_url":"https://api.github.com/users/jnizet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnizet/subscriptions","organizations_url":"https://api.github.com/users/jnizet/orgs","repos_url":"https://api.github.com/users/jnizet/repos","events_url":"https://api.github.com/users/jnizet/events{/privacy}","received_events_url":"https://api.github.com/users/jnizet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-06T06:54:04Z","updated_at":"2018-04-06T06:54:04Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"<!--\r\nPLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.\r\n\r\nISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.\r\n-->\r\n\r\n## I'm submitting a...\r\n<!-- Check one of the following options with \"x\" -->\r\n<pre><code>\r\n[x] Regression (a behavior that used to work and stopped working in a new release)\r\n[ ] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->\r\n[ ] Feature request\r\n[ ] Documentation issue or request\r\n[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n</code></pre>\r\n\r\n## Current behavior\r\n<!-- Describe how the issue manifests. -->\r\nAdding these 3 lines in app.module.ts:\r\n\r\n```\r\nimport { registerLocaleData } from '@angular/common';\r\nimport localeFr from '@angular/common/locales/fr';\r\n\r\nregisterLocaleData(localeFr);\r\n```\r\n\r\n, in a brand new project using Angular 6.0.0-rc.2 and Angular CLI 1.7.4 makes the build fail with the following error:\r\n\r\n```\r\nWARNING in ./node_modules/@angular/common/locales/fr.js\r\n10:24-31 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted\r\n```\r\n\r\nNote: although it just looks like a warning, any attempt at using a locale-related pipe, like date for example, leads to a runtime error:\r\n\r\n```\r\nUncaught Error: Cannot find module \".\"\r\n    at webpackMissingModule (fr.js:10)\r\n    at eval (fr.js:10)\r\n    at eval (fr.js:16)\r\n    at Object../node_modules/@angular/common/locales/fr.js (vendor.bundle.js:14)\r\n    at __webpack_require__ (inline.bundle.js:55)\r\n    at eval (app.module.ts:5)\r\n    at Object../src/app/app.module.ts (main.bundle.js:50)\r\n    at __webpack_require__ (inline.bundle.js:55)\r\n    at eval (main.ts:4)\r\n    at Object../src/main.ts (main.bundle.js:66)\r\nwebpackMissingModule @ fr.js:10\r\n(anonymous) @ fr.js:10\r\n(anonymous) @ fr.js:16\r\n./node_modules/@angular/common/locales/fr.js @ vendor.bundle.js:14\r\n__webpack_require__ @ inline.bundle.js:55\r\n(anonymous) @ app.module.ts:5\r\n./src/app/app.module.ts @ main.bundle.js:50\r\n__webpack_require__ @ inline.bundle.js:55\r\n(anonymous) @ main.ts:4\r\n./src/main.ts @ main.bundle.js:66\r\n__webpack_require__ @ inline.bundle.js:55\r\n0 @ main.bundle.js:74\r\n__webpack_require__ @ inline.bundle.js:55\r\nwebpackJsonpCallback @ inline.bundle.js:26\r\n(anonymous) @ main.bundle.js:1\r\nclient:147 [WDS] Warnings while compiling.\r\nwarnings @ client:147\r\nonmessage @ socket.js:41\r\nEventTarget.dispatchEvent @ sockjs.js:170\r\n(anonymous) @ sockjs.js:883\r\nSockJS._transportMessage @ sockjs.js:881\r\nEventEmitter.emit @ sockjs.js:86\r\nWebSocketTransport.ws.onmessage @ sockjs.js:2957\r\nwrapFn @ zone.js:1188\r\nZoneDelegate.invokeTask @ zone.js:421\r\nZone.runTask @ zone.js:188\r\nZoneTask.invokeTask @ zone.js:496\r\ninvokeTask @ zone.js:1540\r\nglobalZoneAwareCallback @ zone.js:1566\r\nclient:153 ./node_modules/@angular/common/locales/fr.js\r\n10:24-31 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted\r\n @ ./node_modules/@angular/common/locales/fr.js\r\n @ ./src/app/app.module.ts\r\n @ ./src/main.ts\r\n @ multi (webpack)-dev-server/client?http://0.0.0.0:0 ./src/main.ts\r\n```\r\n\r\n## Expected behavior\r\n<!-- Describe what the desired behavior would be. -->\r\n\r\nIt should compile and run fine\r\n\r\n## Minimal reproduction of the problem with instructions\r\n<!--\r\nFor bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via\r\nhttps://stackblitz.com or similar (you can use this template as a starting point: https://stackblitz.com/fork/angular-gitter).\r\n-->\r\n\r\n - `ng new localebug`\r\n - edit the package.json file to use angular 6.0.0-rc.2, zone.js 0.8.25, rxjs 6.0.0-rc.0\r\n - `yarn`\r\n - edit app.module.ts to add the three lines above\r\n - edit app.component.html to add `{{ '2018-04-06T08:56:00.000Z' | date:'longDate' }}`\r\n - `ng serve`\r\n\r\nOr even simpler:\r\n\r\n - `ng new localebug`\r\n - edit the package.json file to use angular 6.0.0-rc.2, zone.js 0.8.25, rxjs 6.0.0-rc.0\r\n - `yarn`\r\n - edit app.component.html to add `{{ '2018-04-06T08:56:00.000Z' | date:'longDate' }}`\r\n - `ng serve --locale=fr`\r\n\r\n\r\n## What is the motivation / use case for changing the behavior?\r\n<!-- Describe the motivation or the concrete use case. -->\r\n\r\n\r\n## Environment\r\n\r\n<pre><code>\r\nAngular version: 6.0.0-rc.2\r\n<!-- Check whether this is still an issue in the most recent Angular version -->\r\n\r\nBrowser:\r\n- [x] Chrome (desktop) version 65.0.3325.181\r\n- [ ] Chrome (Android) version XX\r\n- [ ] Chrome (iOS) version XX\r\n- [x] Firefox version 59.0.1 \r\n- [ ] Safari (desktop) version XX\r\n- [ ] Safari (iOS) version XX\r\n- [ ] IE version XX\r\n- [ ] Edge version XX\r\n \r\nFor Tooling issues:\r\n- Node version: v8.11.1  <!-- run `node --version` -->\r\n- Platform: Mac <!-- Mac, Linux, Windows -->\r\n\r\nOthers:\r\n<!-- Anything else relevant?  Operating system version, IDE, package manager, HTTP server, ... -->\r\n</code></pre>\r\n"}}
{"actor":{"display_login":"jnizet"}}