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

Problem with AngularUniversal schematic #13857

Closed
magoss opened this issue Mar 8, 2019 · 3 comments
Closed

Problem with AngularUniversal schematic #13857

magoss opened this issue Mar 8, 2019 · 3 comments

Comments

@magoss
Copy link

magoss commented Mar 8, 2019

🐞 Bug report

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [x ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

I don't know

Description

Usage of ng add @nguniversal/express-engine does not guarantee Angular Universal app to be ready.

🔬 Minimal Reproduction

  1. Establish new angular project with CLI: ng new derek6 --style=scss --routing
  2. Generate SSR with related schematic: ng add @nguniversal/express-engine --clientProject derek6
  3. Launch SSR (Node) application by appropriate command: npm run build:ssr && npm run serve:ssr

Application is up and running without any error.

  1. Go to default port, which app is served on: http://localhost:4000.

It results with the following error:
You must pass in a NgModule or NgModuleFactory to be bootstrapped

🔥 Exception or Error


Error: You must pass in a NgModule or NgModuleFactory to be bootstrapped
    at View.engine (C:\Users\user\Documents\derek6\dist\server.js:39238:23)
    at View.render (C:\Users\user\Documents\derek6\dist\server.js:123884:8)
    at tryRender (C:\Users\user\Documents\derek6\dist\server.js:121592:10)
    at Function.render (C:\Users\user\Documents\derek6\dist\server.js:121544:3)
    at ServerResponse.render (C:\Users\user\Documents\derek6\dist\server.js:130425:7)
    at C:\Users\user\Documents\derek6\dist\server.js:135:9
    at Layer.handle [as handle_request] (C:\Users\user\Documents\derek6\dist\server.js:123312:5)
    at next (C:\Users\user\Documents\derek6\dist\server.js:123060:13)
    at Route.dispatch (C:\Users\user\Documents\derek6\dist\server.js:123035:3)
    at Layer.handle [as handle_request] (C:\Users\user\Documents\derek6\dist\server.js:123312:5)

🌍 Your Environment




Angular CLI: 7.3.5
Node: 10.15.1
OS: win32 x64
Angular: 7.2.8
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.5
@angular-devkit/build-angular     0.13.5
@angular-devkit/build-optimizer   0.13.5
@angular-devkit/build-webpack     0.13.5
@angular-devkit/core              7.3.5
@angular-devkit/schematics        7.3.5
@angular/cli                      7.3.5
@ngtools/webpack                  7.3.5
@schematics/angular               7.3.5
@schematics/update                0.13.5
rxjs                              6.3.3
typescript                        3.2.4
webpack                           4.29.0

Anything else relevant?

@alan-agius4
Copy link
Collaborator

Hi, thanks for reporting this however it seems that the issue is cause by the @nguniversal/express-engine.

Can you kindly file an issue in their repo https://github.com/angular/universal?

Thanks.

@alan-agius4
Copy link
Collaborator

Duplicate of angular/universal#1139

@alan-agius4 alan-agius4 marked this as a duplicate of angular/universal#1139 Mar 10, 2019
@alan-agius4 alan-agius4 reopened this Mar 10, 2019
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants