Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy Loading of Components errors in the angular sample application #442

Closed
jpspringall opened this issue Aug 29, 2020 · 1 comment
Closed

Comments

@jpspringall
Copy link
Contributor

Description

Lazy loading components does work in the angular sample app, console error generated (See attached)
Also confirmed in our own application

Expected behavior

Lazy loaded components should load

Steps To Reproduce

  1. Generate sample app: jss create my-first-jss-app angular
  2. npm run start to start the app
  3. Navigate to: http://localhost:3000/styleguide
  4. Open console, and see following error: ERROR Error: Uncaught (in promise): TypeError: ngModuleFactory.create is not a function

Possible Fix

I suspect this was caused by updating to Angular 8, and the change in lazy loading syntax

Your Environment

  • Sitecore Version: 9.2
  • JSS Version: Tested with 11, 12, 13, 14
  • Browser Name and version: Chrome 84
  • Operating System and version (desktop or mobile): Windows 10 x64, also tested on Ubuntu 20.04 WSL

Angular CLI: 8.3.29
Node: 12.18.3
OS: linux x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router

Package Version

@angular-devkit/architect 0.803.29
@angular-devkit/build-angular 0.803.29
@angular-devkit/build-optimizer 0.803.29
@angular-devkit/build-webpack 0.803.29
@angular-devkit/core 8.3.29
@angular-devkit/schematics 8.3.29
@angular/cli 8.3.29
@angular/http 7.2.16
@ngtools/webpack 8.3.29
@nguniversal/module-map-ngfactory-loader 8.1.1
@schematics/angular 8.3.29
@schematics/update 0.803.29
rxjs 6.5.5
typescript 3.5.3
webpack 4.39.2
ngModuleFactor create

Screenshots

@sc-illiakovalenko
Copy link
Contributor

@jpspringall Fixed in #440. Will be released in JSS 15.
Fixed here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants