Title: Error during compilation after fixing a syntax error · Issue #16036 · angular/angular-cli · GitHub
Open Graph Title: Error during compilation after fixing a syntax error · Issue #16036 · angular/angular-cli
X Title: Error during compilation after fixing a syntax error · Issue #16036 · angular/angular-cli
Description: 🐞 bug report Affected Package None Is this a regression? Yes, the previous version in which this bug was not present was: 8.2.7 Description If I have a syntax error in the code, *then* start the app with `npm start`, when I fix the error...
Open Graph Description: 🐞 bug report Affected Package None Is this a regression? Yes, the previous version in which this bug was not present was: 8.2.7 Description If I have a syntax error in the code, *then* start the ap...
X Description: 🐞 bug report Affected Package None Is this a regression? Yes, the previous version in which this bug was not present was: 8.2.7 Description If I have a syntax error in the code, *then* start the ap...
Opengraph URL: https://github.com/angular/angular-cli/issues/16036
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error during compilation after fixing a syntax error","articleBody":"\u003c!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅\r\n\r\nOh hi there! 😄\r\n\r\nTo expedite issue processing please search open and closed issues before submitting a new one.\r\nExisting issues often contain information about workarounds, resolution, or progress updates.\r\n\r\n🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->\r\n\r\n\r\n# 🐞 bug report\r\n\r\n### Affected Package\r\n\u003c!-- Can you pin-point one or more @angular/* packages as the source of the bug? -->\r\n\u003c!-- ✍️edit: --> None\r\n\r\n### Is this a regression?\r\n\r\n\u003c!-- Did this behavior use to work in the previous version? -->\r\n\u003c!-- ✍️--> Yes, the previous version in which this bug was not present was: 8.2.7\r\n\r\n\r\n### Description\r\n\r\n\u003c!-- ✍️--> If I have a syntax error in the code, *then* start the app with `npm start`, when I fix the error, the compiler generates the following error:\r\n```\r\nERROR in ./src/main.ts\r\nModule build failed (from ./node_modules/@ngtools/webpack/src/index.js):\r\nError: C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\src\\main.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property. \r\n at AngularCompilerPlugin.getCompiledFile (C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\node_modules\\@ngtools\\webpack\\src\\angular_compiler_plugin.js:920:23)\r\n at plugin.done.then (C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\node_modules\\@ngtools\\webpack\\src\\loader.js:41:31)\r\n at process._tickCallback (internal/process/next_tick.js:68:7)\r\nERROR in ./src/polyfills.ts\r\nModule build failed (from ./node_modules/@ngtools/webpack/src/index.js):\r\nError: C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\src\\polyfills.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.\r\n at AngularCompilerPlugin.getCompiledFile (C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\node_modules\\@ngtools\\webpack\\src\\angular_compiler_plugin.js:920:23)\r\n at plugin.done.then (C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\node_modules\\@ngtools\\webpack\\src\\loader.js:41:31)\r\n at process._tickCallback (internal/process/next_tick.js:68:7)\r\n```\r\n\r\n\r\n## 🔬 Minimal Reproduction\r\n\u003c!--\r\nPlease create and share minimal reproduction of the issue starting with this template: https://stackblitz.com/fork/angular-issue-repro2\r\n-->\r\n\u003c!-- ✍️--> This has been somewhat difficult to reproduce.\r\n\r\nThis is what I did, and can reproduce it every time following these steps.\r\n\r\n1) Made a syntax error in my code\r\n\r\n```\r\n ngOnInit() {\r\n this.sub = this.productService.selectedProductChanges$.subscribe({\r\n next: selectedProduct => this.product = selectedProduct,\r\n error: err => this.errorMessage = err\r\n }; // \u003c- Missing paren here\r\n }\r\n```\r\n2) Started the app with `npm start`\r\n\r\n3) I see the correct `')' expected` error message\r\n\r\n4) Fixed the error, got the error message as shown below.\r\n\r\n5) At this point I have to stop the compiler and restart, then it compiles without issue.\r\n\r\nHere is the output from the console:\r\n\r\n```\r\nPS C:\\Users\\...> npm start\r\n\r\n> apm@0.0.0 start C:\\Users\\...\r\n> ng serve -o\r\n\r\n10% building 3/3 modules 0 activei 「wds」: Project is running at http://localhost:4200/webpack-dev-server/\r\ni 「wds」: webpack output is served from /\r\ni 「wds」: 404s will fallback to //index.html\r\n\r\nchunk {main} main.js, main.js.map (main) 2.07 kB [initial] [rendered]\r\nchunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 714 bytes [initial] [rendered]\r\nchunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]\r\nchunk {styles} styles.js, styles.js.map (styles) 1.04 MB [initial] [rendered]\r\nchunk {vendor} vendor.js, vendor.js.map (vendor) 339 kB [initial] [rendered]\r\nDate: 2019-11-01T23:24:46.037Z - Hash: 9acd019b2df6dfe09939 - Time: 2676ms\r\n\r\nERROR in src/app/products/product-shell/product-shell-detail.component.ts:23:10 - error TS1005: ')' expected.\r\n\r\n23 };\r\n ~\r\n\r\n** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **\r\ni 「wdm」: Failed to compile.\r\ni 「wdm」: Compiling...\r\n\r\nDate: 2019-11-01T23:24:55.928Z - Hash: 44abf69c38b2e0c5ade5\r\n3 unchanged chunks\r\nchunk {main} main.js, main.js.map (main) 2.78 kB [initial] [rendered]\r\nchunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 1.42 kB [initial] [rendered]\r\nTime: 331ms\r\n\r\nERROR in ./src/main.ts\r\nModule build failed (from ./node_modules/@ngtools/webpack/src/index.js):\r\nError: C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\src\\main.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property. \r\n at AngularCompilerPlugin.getCompiledFile (C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\node_modules\\@ngtools\\webpack\\src\\angular_compiler_plugin.js:920:23)\r\n at plugin.done.then (C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\node_modules\\@ngtools\\webpack\\src\\loader.js:41:31)\r\n at process._tickCallback (internal/process/next_tick.js:68:7)\r\nERROR in ./src/polyfills.ts\r\nModule build failed (from ./node_modules/@ngtools/webpack/src/index.js):\r\nError: C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\src\\polyfills.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.\r\n at AngularCompilerPlugin.getCompiledFile (C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\node_modules\\@ngtools\\webpack\\src\\angular_compiler_plugin.js:920:23)\r\n at plugin.done.then (C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\node_modules\\@ngtools\\webpack\\src\\loader.js:41:31)\r\n at process._tickCallback (internal/process/next_tick.js:68:7)\r\ni 「wdm」: Failed to compile.\r\n```\r\n\r\nIf you want to try out the same code I'm using, you can find it here: https://github.com/DeborahK/Angular-Communication/tree/master/APM-Final%20v8\r\n\r\nYou'll need to update it to v9 using these steps:\r\n\r\nnpm install --no-save @angular/cli@next\r\nng update @angular/cli @angular/core --next\r\n\r\n\u003c!--\r\nIf StackBlitz is not suitable for reproduction of your issue, please create a minimal GitHub repository with the reproduction of the issue.\r\nA good way to make a minimal reproduction is to create a new app via `ng new repro-app` and add the minimum possible code to show the problem. \r\nShare the link to the repo below along with step-by-step instructions to reproduce the problem, as well as expected and actual behavior.\r\n\r\nIssues that don't have enough info and can't be reproduced will be closed.\r\n\r\nYou can read more about issue submission guidelines here: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-submitting-an-issue\r\n-->\r\n\r\n## 🔥 Exception or Error\r\n\u003cpre>\u003ccode>\r\n\u003c!-- If the issue is accompanied by an exception or an error, please share it below: -->\r\n\u003c!-- ✍️-->\r\nERROR in ./src/main.ts\r\nModule build failed (from ./node_modules/@ngtools/webpack/src/index.js):\r\nError: C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\src\\main.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property. \r\n at AngularCompilerPlugin.getCompiledFile (C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\node_modules\\@ngtools\\webpack\\src\\angular_compiler_plugin.js:920:23)\r\n at plugin.done.then (C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\node_modules\\@ngtools\\webpack\\src\\loader.js:41:31)\r\n at process._tickCallback (internal/process/next_tick.js:68:7)\r\nERROR in ./src/polyfills.ts\r\nModule build failed (from ./node_modules/@ngtools/webpack/src/index.js):\r\nError: C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\src\\polyfills.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.\r\n at AngularCompilerPlugin.getCompiledFile (C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\node_modules\\@ngtools\\webpack\\src\\angular_compiler_plugin.js:920:23)\r\n at plugin.done.then (C:\\Users\\Deborah\\Documents\\GitHub\\Angular-Communication\\APM-Final v8\\node_modules\\@ngtools\\webpack\\src\\loader.js:41:31)\r\n at process._tickCallback (internal/process/next_tick.js:68:7)\r\ni 「wdm」: Failed to compile.\r\n\u003c/code>\u003c/pre>\r\n\r\n\r\n## 🌍 Your Environment\r\n\r\n**Angular Version:**\r\n\u003cpre>\u003ccode>\r\n\u003c!-- run `ng version` and paste output below -->\r\n\u003c!-- ✍️-->\r\nPackage Version\r\n-----------------------------------------------------------\r\n@angular-devkit/architect 0.900.0-rc.0\r\n@angular-devkit/build-angular 0.900.0-rc.0\r\n@angular-devkit/build-optimizer 0.900.0-rc.0\r\n@angular-devkit/build-webpack 0.900.0-rc.0\r\n@angular-devkit/core 9.0.0-rc.0\r\n@angular-devkit/schematics 9.0.0-rc.0\r\n@ngtools/webpack 9.0.0-rc.0\r\n@schematics/angular 9.0.0-rc.0\r\n@schematics/update 0.900.0-rc.0\r\nrxjs 6.5.3\r\ntypescript 3.6.4\r\nwebpack 4.41.2\r\n\u003c/code>\u003c/pre>\r\n\r\n**Anything else relevant?**\r\n\u003c!-- ✍️Is this a browser specific issue? If so, please specify the browser and version. -->\r\n\r\n\u003c!-- ✍️Do any of these matter: operating system, IDE, package manager, HTTP server, ...? If so, please mention it below. -->\r\n@StephenFluin @alan-agius4 ","author":{"url":"https://github.com/DeborahK","@type":"Person","name":"DeborahK"},"datePublished":"2019-11-01T23:35:45Z","url":"https://github.com/angular/angular-cli/issues/16036"}
| 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:d9f4ddf3-8d9a-2496-9df7-e20c2284f89e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B554:842EC:15600DB:1C8A3D6:6B013726 |
| html-safe-nonce | 0af65c7c7d76677346b2ce310194262593605ee8016d7a1742511a4ef46cb99a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTU0Ojg0MkVDOjE1NjAwREI6MUM4QTNENjo2QjAxMzcyNiIsInZpc2l0b3JfaWQiOiI0ODU2MTQwMzM3MzQ2ODUyNjQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3e8a1ccecbff714bd8eefbcaadd7660d838569e887dc1cd54c4f841e20a648cc |
| hovercard-subject-tag | issue:516411139 |
| 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/16036/issue_layout |
| twitter:image | https://opengraph.githubassets.com/225a91b7cd9cd2498017951537cb95c0cc281ac48834bcef69cbf116b48ac836/angular/angular-cli/issues/16036 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/225a91b7cd9cd2498017951537cb95c0cc281ac48834bcef69cbf116b48ac836/angular/angular-cli/issues/16036 |
| og:image:alt | 🐞 bug report Affected Package None Is this a regression? Yes, the previous version in which this bug was not present was: 8.2.7 Description If I have a syntax error in the code, *then* start the ap... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DeborahK |
| 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