Title: Nondescript compilation error message when Ivy enabled · Issue #30885 · angular/angular · GitHub
Open Graph Title: Nondescript compilation error message when Ivy enabled · Issue #30885 · angular/angular
X Title: Nondescript compilation error message when Ivy enabled · Issue #30885 · angular/angular
Description: 🐞 bug report When compiling an upgraded Angular 8.0.0 project with Ivy enabled, the compiler generates an ERROR in Value [object Object] is not literal and cannot be used in this context. error with no further information to help identif...
Open Graph Description: 🐞 bug report When compiling an upgraded Angular 8.0.0 project with Ivy enabled, the compiler generates an ERROR in Value [object Object] is not literal and cannot be used in this context. error wit...
X Description: 🐞 bug report When compiling an upgraded Angular 8.0.0 project with Ivy enabled, the compiler generates an ERROR in Value [object Object] is not literal and cannot be used in this context. error wit...
Opengraph URL: https://github.com/angular/angular/issues/30885
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Nondescript compilation error message when Ivy enabled","articleBody":"# 🐞 bug report\r\n\r\nWhen compiling an upgraded Angular 8.0.0 project with Ivy enabled, the compiler generates an `ERROR in Value [object Object] is not literal and cannot be used in this context.` error with no further information to help identify the cause.\r\n \r\n### Is this a regression?\r\n\r\nNo. I have not tried to compile with Ivy enabled before. The project does compile fine with AoT without Ivy enabled though.\r\n\r\n### Description\r\n\r\nI have a reasonably large application that was recently upgraded from Angular 7 to Angular 8.0.0. The application compiles without issue however when Ivy is enabled the compiler produces the following error:\r\n\r\n\u003cpre>\u003ccode>\r\nDate: 2019-06-06T04:11:25.373Z\r\nHash: 087b7b5fb4b324ff6aca\r\nTime: 49369ms\r\nchunk {0} runtime-es5.b13fe75f2187557b33a6.js, runtime-es5.b13fe75f2187557b33a6.js.map (runtime) 1.49 kB [entry] [rendered]\r\nchunk {1} main-es5.4af9b61479361f268d39.js, main-es5.4af9b61479361f268d39.js.map (main) 186 bytes [initial] [rendered]\r\nchunk {2} polyfills-es5.cc41145fc3ff39238270.js, polyfills-es5.cc41145fc3ff39238270.js.map (polyfills) 68.1 kB [initial] [rendered]\r\nchunk {3} styles.1a689b634a36680c47f4.css, styles.1a689b634a36680c47f4.css.map (styles) 3.66 kB [initial] [rendered]\r\nchunk {scripts} scripts.403d9d57243d96fb1784.js, scripts.403d9d57243d96fb1784.js.map (scripts) 1.18 kB [entry] [rendered]\r\n\r\nERROR in Value [object Object] is not literal and cannot be used in this context.\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 1\r\nnpm ERR! content-snare-client@1.2.0 build:ngx: `ng build --configuration=${NG_ENV:-prod} --deploy-url=${NG_DEPLOY_URL:-https://app.contentsnare.com/}`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the content-snare-client@1.2.0 build:ngx script.\r\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\r\n\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR! /home/mark/.npm/_logs/2019-06-06T04_11_25_582Z-debug.log\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 1\r\nnpm ERR! content-snare-client@1.2.0 build:aot: `npm run build:ngx`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the content-snare-client@1.2.0 build:aot script.\r\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\r\n\r\nnpm ERR! A complete log of this run can be found in:\r\n\u003c/code>\u003c/pre>\r\n\r\nI reviewed the referenced log files and they provide no additional information.\r\n\r\nThe only error information that is produced is:\r\n\r\n`ERROR in Value [object Object] is not literal and cannot be used in this context.`\r\n\r\nNot sure if relevant, but the normal AoT non-ivy enabled compilation creates 28 separate chunks, with scripts being one of the last chunks created. In the above, it creates only 5 chunks.\r\n\r\n## 🔬 Minimal Reproduction\r\n\r\nI tried compiling an empty Angular 8 project and this compiles with Ivy enabled without issue. \r\n\r\nIt is very hard to provide a minimum project as my project is quite large and without any additional error information it would take me weeks to gradually remove code until the error goes away.\r\n\r\nAlthough the project does comprise a dozen or so modules, the number of 3rd party NPM packages is quite small and I receive no NPM compatibility warnings when I run `npm clean-install`.\r\n\r\nBelow is a list of installed project NPM packages if this helps:\r\n\r\n\u003cpre>\u003ccode>\r\n\"dependencies\": {\r\n \"@angular/animations\": \"^8.0.0\",\r\n \"@angular/common\": \"^8.0.0\",\r\n \"@angular/compiler\": \"^8.0.0\",\r\n \"@angular/core\": \"^8.0.0\",\r\n \"@angular/forms\": \"^8.0.0\",\r\n \"@angular/platform-browser\": \"^8.0.0\",\r\n \"@angular/platform-browser-dynamic\": \"^8.0.0\",\r\n \"@angular/router\": \"^8.0.0\",\r\n \"@fullcalendar/core\": \"^4.2.0\",\r\n \"@fullcalendar/daygrid\": \"^4.2.0\",\r\n \"@ngx-translate/core\": \"^11.0.1\",\r\n \"@ngx-translate/http-loader\": \"^4.0.0\",\r\n \"classlist.js\": \"^1.1.20150312\",\r\n \"core-js\": \"^3.1.2\",\r\n \"file-saver\": \"^2.0.1\",\r\n \"moment\": \"^2.24.0\",\r\n \"ng2-dragula\": \"^2.1.1\",\r\n \"ngx-clipboard\": \"^12.0.1\",\r\n \"ngx-filesaver\": \"^2.2.1\",\r\n \"rollbar\": \"^2.7.1\",\r\n \"rxjs\": \"^6.5.2\",\r\n \"ts-md5\": \"^1.2.4\",\r\n \"tslib\": \"^1.9.3\",\r\n \"zone.js\": \"~0.9.1\"\r\n },\r\n \"devDependencies\": {\r\n \"@angular-devkit/build-angular\": \"^0.800.0\",\r\n \"@angular/cli\": \"^8.0.0\",\r\n \"@angular/compiler-cli\": \"^8.0.0\",\r\n \"@angular/language-service\": \"^8.0.0\",\r\n \"@biesbjerg/ngx-translate-extract\": \"^2.3.4\",\r\n \"@compodoc/compodoc\": \"^1.1.9\",\r\n \"@types/file-saver\": \"^2.0.1\",\r\n \"@types/jasmine\": \"^3.3.12\",\r\n \"@types/jasminewd2\": \"^2.0.6\",\r\n \"@types/node\": \"~8.9.3\",\r\n \"codelyzer\": \"^5.1.0\",\r\n \"cspell\": \"^3.2.17\",\r\n \"gzipper\": \"^2.6.0\",\r\n \"jasmine-core\": \"^3.4.0\",\r\n \"jasmine-spec-reporter\": \"^4.2.1\",\r\n \"karma\": \"^4.1.0\",\r\n \"karma-chrome-launcher\": \"^2.2.0\",\r\n \"karma-coverage-istanbul-reporter\": \"^2.0.5\",\r\n \"karma-jasmine\": \"^2.0.1\",\r\n \"karma-jasmine-html-reporter\": \"^1.4.2\",\r\n \"prettier\": \"^1.17.1\",\r\n \"protractor\": \"^5.4.2\",\r\n \"ts-node\": \"~7.0.0\",\r\n \"tslint\": \"~5.16.0\",\r\n \"tslint-config-prettier\": \"^1.18.0\",\r\n \"typescript\": \"~3.4.5\",\r\n \"webpack-bundle-analyzer\": \"^3.3.2\"\r\n }\r\n\u003c/code>\u003c/pre>\r\n\r\n\r\n## 🔥 Exception or Error\r\n\u003cpre>\u003ccode>\r\nERROR in Value [object Object] is not literal and cannot be used in this context.\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\nAngular CLI: 8.0.1\r\nNode: 11.8.0\r\nOS: linux x64\r\nAngular: 8.0.0\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... language-service, platform-browser, platform-browser-dynamic\r\n... router\r\n\r\nPackage Version\r\n-----------------------------------------------------------\r\n@angular-devkit/architect 0.800.1\r\n@angular-devkit/build-angular 0.800.1\r\n@angular-devkit/build-optimizer 0.800.1\r\n@angular-devkit/build-webpack 0.800.1\r\n@angular-devkit/core 8.0.1\r\n@angular-devkit/schematics 8.0.1\r\n@angular/cli 8.0.1\r\n@ngtools/webpack 8.0.1\r\n@schematics/angular 8.0.1\r\n@schematics/update 0.800.1\r\nrxjs 6.5.2\r\ntypescript 3.4.5\r\nwebpack 4.30.0\r\n\u003c/code>\u003c/pre>\r\n\r\n\r\n","author":{"url":"https://github.com/mark-akturatech","@type":"Person","name":"mark-akturatech"},"datePublished":"2019-06-06T04:52:31Z","url":"https://github.com/angular/angular/issues/30885"}
| 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:b716c375-445c-9e53-6bb3-38e2c9ef8f32 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 96A2:2454CC:13E15AE:193FB6A:6B012968 |
| html-safe-nonce | 13a3992835a0ac0b20e60a62e37053a3797016bbe6be528daaaabc71166f7d99 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NkEyOjI0NTRDQzoxM0UxNUFFOjE5M0ZCNkE6NkIwMTI5NjgiLCJ2aXNpdG9yX2lkIjoiNjU0NzIzNjQ3ODM5MTQ5NTAxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fcf9964ebefee801712d3a4d4611ed8e65b8f26d434c6ffbc666be5b4185e213 |
| hovercard-subject-tag | issue:452830988 |
| 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/30885/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7b41bf9d60f3b4768fb11842179b6c9b02c8985f71e1d4e59c98f9e399f396ae/angular/angular/issues/30885 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7b41bf9d60f3b4768fb11842179b6c9b02c8985f71e1d4e59c98f9e399f396ae/angular/angular/issues/30885 |
| og:image:alt | 🐞 bug report When compiling an upgraded Angular 8.0.0 project with Ivy enabled, the compiler generates an ERROR in Value [object Object] is not literal and cannot be used in this context. error wit... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mark-akturatech |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| 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