Title: Wiki: stories universal rendering: Cannot find name 'AppServerModuleNgFactory' not 'LAZY_MODULE_MAP' · Issue #13385 · angular/angular-cli · GitHub
Open Graph Title: Wiki: stories universal rendering: Cannot find name 'AppServerModuleNgFactory' not 'LAZY_MODULE_MAP' · Issue #13385 · angular/angular-cli
X Title: Wiki: stories universal rendering: Cannot find name 'AppServerModuleNgFactory' not 'LAZY_MODULE_MAP' · Issue #13385 · angular/angular-cli
Description: Bug Report or Feature Request (mark with an x) - [x ] bug report -> please search issues before submitting - [ ] feature request Versions v8.11.3 6.5.0 _ _ ____ _ ___ / \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _| / △ \ | '_ \ / _` | | | ...
Open Graph Description: Bug Report or Feature Request (mark with an x) - [x ] bug report -> please search issues before submitting - [ ] feature request Versions v8.11.3 6.5.0 _ _ ____ _ ___ / \ _ __ __ _ _ _| | __ _ _ __...
X Description: Bug Report or Feature Request (mark with an x) - [x ] bug report -> please search issues before submitting - [ ] feature request Versions v8.11.3 6.5.0 _ _ ____ _ ___ / \ _ __ __ _ _ _| | __ _ _...
Opengraph URL: https://github.com/angular/angular-cli/issues/13385
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Wiki: stories universal rendering: Cannot find name 'AppServerModuleNgFactory' not 'LAZY_MODULE_MAP'","articleBody":"\u003c!--\r\nIF YOU DON'T FILL OUT THE FOLLOWING INFORMATION YOUR ISSUE MIGHT BE CLOSED WITHOUT INVESTIGATING\r\n-->\r\n### Bug Report or Feature Request (mark with an `x`)\r\n```\r\n- [x ] bug report -> please search issues before submitting\r\n- [ ] feature request\r\n```\r\n\r\n### Versions\r\n\u003c!--\r\nOutput from: `node --version`, `npm --version` and `ng --version`.\r\n Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra? High Sierra?)\r\n-->\r\n```\r\nv8.11.3\r\n6.5.0\r\n\r\n _ _ ____ _ ___\r\n / \\ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|\r\n / △ \\ | '_ \\ / _` | | | | |/ _` | '__| | | | | | |\r\n / ___ \\| | | | (_| | |_| | | (_| | | | |___| |___ | |\r\n /_/ \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_| \\____|_____|___|\r\n |___/\r\n \r\n\r\nAngular CLI: 6.1.5\r\nNode: 8.11.3\r\nOS: linux x64\r\nAngular: 6.1.9\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\nPackage Version\r\n-----------------------------------------------------------\r\n@angular-devkit/architect 0.7.5\r\n@angular-devkit/build-angular 0.7.5\r\n@angular-devkit/build-optimizer 0.7.5\r\n@angular-devkit/build-webpack 0.7.5\r\n@angular-devkit/core 0.7.5\r\n@angular-devkit/schematics 0.7.5\r\n@angular/cli 6.1.5\r\n@angular/platform-server 6.1.10\r\n@ngtools/webpack 6.1.5\r\n@schematics/angular 0.7.5\r\n@schematics/update 0.7.5\r\nrxjs 6.3.3\r\ntypescript 2.7.2\r\nwebpack 4.9.2\r\n```\r\nRunning on Ubuntu 18.04\r\n\r\n### Repro steps\r\n\u003c!--\r\nSimple steps to reproduce this bug.\r\nPlease include: commands run (incl args), packages added, related code changes.\r\nA link to a sample repo would help too.\r\n-->\r\n1. Follow [the universal story](https://github.com/angular/angular-cli/wiki/stories-universal-rendering), up to and including step 4.\r\n2. Try step 5.\r\n\r\n### The log given by the failure\r\n\u003c!-- Normally this include a stack trace and some more information. -->\r\n```\r\ncoo@thor:~/dev/www/cirque/cirque-library$ npm run build:ssr\r\n\r\n> cirquel-library@0.0.0 build:ssr /home/coo/dev/www/cirque/cirque-library\r\n> npm run build:client-and-server-bundles && npm run webpack:server\r\n\r\n\r\n> cirquel-library@0.0.0 build:client-and-server-bundles /home/coo/dev/www/cirque/cirque-library\r\n> ng build --prod && ng run cirquel-library:server\r\n\r\n\r\nDate: 2019-01-09T07:07:33.323Z\r\nHash: 0e3c6ba12126ad16a590\r\nTime: 12638ms\r\nchunk {scripts} scripts.8af9600ce405f4ee8475.js (scripts) 212 kB [rendered]\r\nchunk {0} runtime.a66f828dca56eeb90e02.js (runtime) 1.05 kB [entry] [rendered]\r\nchunk {1} styles.1c9db16de07904d7c9fe.css (styles) 131 kB [initial] [rendered]\r\nchunk {2} polyfills.2f4a59095805af02bd79.js (polyfills) 59.6 kB [initial] [rendered]\r\nchunk {3} main.24795b6742be479dce8d.js (main) 581 kB [initial] [rendered]\r\n\r\nDate: 2019-01-09T07:07:40.182Z\r\nHash: 530691710610f1f8f121\r\nTime: 5232ms\r\nchunk {main} main.js, main.js.map (main) 164 kB [entry] [rendered]\r\n\r\n> cirquel-library@0.0.0 webpack:server /home/coo/dev/www/cirque/cirque-library\r\n> webpack --config webpack.server.config.js --progress --colors\r\n\r\nHash: 9950f741fdbec97b20ee\r\nVersion: webpack 4.9.2\r\nTime: 5035ms\r\nBuilt at: 2019-01-09 14:07:45\r\n Asset Size Chunks Chunk Names\r\nserver.js 4.74 MiB 0 [emitted] server\r\nEntrypoint server = server.js\r\n [0] ./server.ts 1.66 KiB {0} [built] [2 errors]\r\n [2] external \"events\" 42 bytes {0} [built]\r\n [3] external \"fs\" 42 bytes {0} [built]\r\n [4] external \"timers\" 42 bytes {0} [optional] [built]\r\n [5] external \"crypto\" 42 bytes {0} [built]\r\n[211] ./src lazy namespace object 160 bytes {0} [built]\r\n[214] external \"url\" 42 bytes {0} [built]\r\n[274] external \"http\" 42 bytes {0} [built]\r\n[275] external \"https\" 42 bytes {0} [built]\r\n[276] external \"os\" 42 bytes {0} [built]\r\n[284] external \"path\" 42 bytes {0} [built]\r\n[293] external \"util\" 42 bytes {0} [built]\r\n[301] external \"net\" 42 bytes {0} [built]\r\n[306] external \"buffer\" 42 bytes {0} [built]\r\n[363] ./src sync 160 bytes {0} [built]\r\n + 376 hidden modules\r\n\r\nERROR in /home/coo/dev/www/cirque/cirque-library/server.ts\r\n./server.ts\r\n[tsl] ERROR in /home/coo/dev/www/cirque/cirque-library/server.ts(28,23)\r\n TS2304: Cannot find name 'AppServerModuleNgFactory'.\r\n\r\nERROR in /home/coo/dev/www/cirque/cirque-library/server.ts\r\n./server.ts\r\n[tsl] ERROR in /home/coo/dev/www/cirque/cirque-library/server.ts(34,24)\r\n TS2304: Cannot find name 'LAZY_MODULE_MAP'.\r\n\r\nERROR in /home/coo/dev/www/cirque/cirque-library/src/app/bg-image.directive.spec.ts\r\n[tsl] ERROR in /home/coo/dev/www/cirque/cirque-library/src/app/bg-image.directive.spec.ts(5,23)\r\n TS2554: Expected 1 arguments, but got 0.\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 2\r\nnpm ERR! cirquel-library@0.0.0 webpack:server: `webpack --config webpack.server.config.js --progress --colors`\r\nnpm ERR! Exit status 2\r\nnpm ERR!\r\nnpm ERR! Failed at the cirquel-library@0.0.0 webpack:server 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/coo/.npm/_logs/2019-01-09T07_07_45_824Z-debug.log\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 2\r\nnpm ERR! cirquel-library@0.0.0 build:ssr: `npm run build:client-and-server-bundles && npm run webpack:server`\r\nnpm ERR! Exit status 2\r\nnpm ERR!\r\nnpm ERR! Failed at the cirquel-library@0.0.0 build:ssr 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/coo/.npm/_logs/2019-01-09T07_07_45_835Z-debug.log\r\n```\r\n\r\n### Desired functionality\r\n\u003c!--\r\nWhat would like to see implemented?\r\nWhat is the usecase?\r\n-->\r\n\r\nThe references in the suggested `server.ts` file as described in the wiki, [step 4](https://github.com/angular/angular-cli/wiki/stories-universal-rendering#serverts-root-project-level) should be correct. The modules `AppServerModuleNgFactory` and `LAZY_MODULE_MAP` have no import, so the TS compiler fails.\r\n\r\n\r\n### Mention any other details that might be useful\r\n\u003c!-- Please include a link to the repo if this is related to an OSS project. -->\r\nVscode already complains in the editor that these 2 names cannot be found. And when running the sugggested commands, the ng cli also concludes these names are unknown.\r\n\r\n(I've tried finding the correct references somewhere, but apparently I don't have the know-how to fix this.)","author":{"url":"https://github.com/c00","@type":"Person","name":"c00"},"datePublished":"2019-01-09T07:28:28Z","url":"https://github.com/angular/angular-cli/issues/13385"}
| 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:29efb523-c4ba-7ef8-c644-b87f5bf082b5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D238:4BB79:15C2DAF:1BBEFE4:6B01371C |
| html-safe-nonce | b7d239713269a261b1e3e0d45fd89251153e293b8b71c8adb0136cf903cf9a4a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjM4OjRCQjc5OjE1QzJEQUY6MUJCRUZFNDo2QjAxMzcxQyIsInZpc2l0b3JfaWQiOiI1MjMyMzA0NjE1NDkxNDUwNjUyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 13fb59ac21f7db9bf7138bdef457b4da8f214ba2c73a401dd051b110ef109697 |
| hovercard-subject-tag | issue:397244053 |
| 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/13385/issue_layout |
| twitter:image | https://opengraph.githubassets.com/90b1ecde7a240f20ae33f215fd49fdf9eab1f3620db3b064da916af2b8ba458c/angular/angular-cli/issues/13385 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/90b1ecde7a240f20ae33f215fd49fdf9eab1f3620db3b064da916af2b8ba458c/angular/angular-cli/issues/13385 |
| og:image:alt | Bug Report or Feature Request (mark with an x) - [x ] bug report -> please search issues before submitting - [ ] feature request Versions v8.11.3 6.5.0 _ _ ____ _ ___ / \ _ __ __ _ _ _| | __ _ _ __... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | c00 |
| 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