Title: ng test fails to build lazy loading modules · Issue #8066 · angular/angular-cli · GitHub
Open Graph Title: ng test fails to build lazy loading modules · Issue #8066 · angular/angular-cli
X Title: ng test fails to build lazy loading modules · Issue #8066 · angular/angular-cli
Description: Bug Report or Feature Request (mark with an x) - [x] bug report - [ ] feature request Versions. Angular CLI: 1.5.0-rc.0 Node: 8.5.0 OS: win32 x64 Angular: 5.0.0-rc.2 ... animations, common, compiler, compiler-cli, core, forms ... http, l...
Open Graph Description: Bug Report or Feature Request (mark with an x) - [x] bug report - [ ] feature request Versions. Angular CLI: 1.5.0-rc.0 Node: 8.5.0 OS: win32 x64 Angular: 5.0.0-rc.2 ... animations, common, compile...
X Description: Bug Report or Feature Request (mark with an x) - [x] bug report - [ ] feature request Versions. Angular CLI: 1.5.0-rc.0 Node: 8.5.0 OS: win32 x64 Angular: 5.0.0-rc.2 ... animations, common, compile...
Opengraph URL: https://github.com/angular/angular-cli/issues/8066
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ng test fails to build lazy loading modules","articleBody":"### Bug Report or Feature Request (mark with an `x`)\r\n```\r\n- [x] bug report\r\n- [ ] feature request\r\n```\r\n\r\n### Versions.\r\n```\r\nAngular CLI: 1.5.0-rc.0\r\nNode: 8.5.0\r\nOS: win32 x64\r\nAngular: 5.0.0-rc.2\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\n@angular/cli: 1.5.0-rc.0\r\n@angular-devkit/build-optimizer: 0.0.27\r\n@angular-devkit/core: 0.0.20\r\n@angular-devkit/schematics: 0.0.33\r\n@ngtools/json-schema: 1.1.0\r\n@ngtools/webpack: 1.8.0-rc.0\r\n@schematics/angular: 0.0.45\r\ntypescript: 2.3.4\r\nwebpack: 3.7.1\r\n```\r\n\r\n### Repro steps.\r\n- ```ng new apptest```\r\n- update packages to latest pre-releases angular 5.0.0-rc.2, angluar/cli 1.5.0-rc.0 and typescript 2.4.0\r\n- Create a module to be lazy loaded\r\n- run ```ng test```\r\n\r\n### The log given by the failure.\r\n```\r\nC:\\Users\\development\\apptest>ng test\r\n 10% building modules 1/1 modules 0 active16 10 2017 08:13:36.642:WARN [karma]: No captured browser, open http://localhost:9876/\r\n16 10 2017 08:13:36.662:WARN [karma]: Port 9876 in use\r\n16 10 2017 08:13:36.665:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:9877/\r\n16 10 2017 08:13:36.665:INFO [launcher]: Launching browser Chrome with unlimited concurrency\r\n16 10 2017 08:13:36.690:INFO [launcher]: Starting browser Chrome [../../../../../src/polyfills.ts] ./src/po\r\nlyfills.ts 299 bytes {polyfills} [built] [failed] [1 error]\r\n [0] multi ./src/polyfills.ts 28 bytes {polyfills} [built]\r\n[../../../../../src/test.ts] ./src/test.ts 299 bytes {main} [built] [failed] [1 error]\r\n\r\nERROR in ./src/test.ts\r\nModule build failed: Error: TypeScript compilation failed.\r\n at plugin.done.then (C:\\Users\\development\\apptest\\node_modules\\@ngtools\\webpack\\src\\loader.js:479:27)\r\n at \u003canonymous>\r\n at process._tickCallback (internal/process/next_tick.js:188:7)\r\n\r\nERROR in ./src/polyfills.ts\r\nModule build failed: Error: TypeScript compilation failed.\r\n at plugin.done.then (C:\\Users\\development\\apptest\\node_modules\\@ngtools\\webpack\\src\\loader.js:479:27)\r\n at \u003canonymous>\r\n at process._tickCallback (internal/process/next_tick.js:188:7)\r\n @ multi ./src/polyfills.ts\r\n\r\nERROR in Error: C:/Users/development/apptest/src/app/lazy/lazy.module.ts is not part of the TypeScript compilation. Please include it in your tsconfig via the 'files' or 'include' property.\r\n at sourceFiles._getChangedTsFiles.map (C:\\Users\\development\\apptest\\node_modules\\@ngtools\\webpack\\src\\angular_compiler_plugin.js:517:31)\r\n at Array.map (\u003canonymous>)\r\n at Promise.resolve.then.then.then (C:\\Users\\development\\apptest\\node_modules\\@ngtools\\webpack\\src\\angular_compiler_plugin.js:513:63)\r\n at \u003canonymous>\r\n```\r\n\r\n### Desired functionality.\r\nShould build and run tests\r\n\r\n### Mention any other details that might be useful.\r\n\r\n- ng build works fine (jit + aot)\r\n- current workaround is changing tsconfig.spec.json include section to **/*.ts\r\n- works fine in angular 5 with angular-cli 1.4.7(with typescript 2.4.2) and angular 4.4.5 with angular-cli 1.5.0-rc.0 (with typescript 2.3.4)\r\n","author":{"url":"https://github.com/tsangste","@type":"Person","name":"tsangste"},"datePublished":"2017-10-16T10:04:49Z","url":"https://github.com/angular/angular-cli/issues/8066"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:dbfa5b41-38ff-4125-112a-89d7452ce754 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E0E0:A99C2:3423EC7:424B77C:6B01C7DB |
| html-safe-nonce | c7d012a1d9a931ae4ee5abe0a9d3ec160b206edac4342910d4cadd09704a4860 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMEUwOkE5OUMyOjM0MjNFQzc6NDI0Qjc3Qzo2QjAxQzdEQiIsInZpc2l0b3JfaWQiOiIxMzk2NjEwNTg0OTA4MjUzMTQ3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1dce98d08039943f107480313e6c9cc310a0100578cf5feb4bff99f56b48b10d |
| hovercard-subject-tag | issue:265713996 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/8066/issue_layout |
| twitter:image | https://opengraph.githubassets.com/314b0cd98631b4a8f2d1c006d8924f57e23fe33faddb57d15b77efab498d38ea/angular/angular-cli/issues/8066 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/314b0cd98631b4a8f2d1c006d8924f57e23fe33faddb57d15b77efab498d38ea/angular/angular-cli/issues/8066 |
| og:image:alt | Bug Report or Feature Request (mark with an x) - [x] bug report - [ ] feature request Versions. Angular CLI: 1.5.0-rc.0 Node: 8.5.0 OS: win32 x64 Angular: 5.0.0-rc.2 ... animations, common, compile... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tsangste |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width