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

@angular-devkit/build-angular@0.13.5 breaks angular universal #13865

Closed
robertisaacBBN opened this issue Mar 10, 2019 · 2 comments · Fixed by #13868
Closed

@angular-devkit/build-angular@0.13.5 breaks angular universal #13865

robertisaacBBN opened this issue Mar 10, 2019 · 2 comments · Fixed by #13868

Comments

@robertisaacBBN
Copy link

robertisaacBBN commented Mar 10, 2019

🐞 Bug report

Command (mark with an x)

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

Is this a regression?

Yes, the previous version in which this bug was not present was: @angular-devkit/build-angular@0.13.4

Description

when run npm run build:ssr && npn run serve:ssr and open http://localhost:4000 from the browser it shows

Error: You must pass in a NgModule or NgModuleFactory to be bootstrapped
    at View.engine (C:\Users\rober\ng\test-ssr\dist\server.js:39238:23)
    at View.render (C:\Users\rober\ng\test-ssr\dist\server.js:123884:8)
    at tryRender (C:\Users\rober\ng\test-ssr\dist\server.js:121592:10)
    at Function.render (C:\Users\rober\ng\test-ssr\dist\server.js:121544:3)
    at ServerResponse.render (C:\Users\rober\ng\test-ssr\dist\server.js:130425:7)
    at C:\Users\rober\ng\test-ssr\dist\server.js:135:9
    at Layer.handle [as handle_request] (C:\Users\rober\ng\test-ssr\dist\server.js:123312:5)
    at next (C:\Users\rober\ng\test-ssr\dist\server.js:123060:13)
    at Route.dispatch (C:\Users\rober\ng\test-ssr\dist\server.js:123035:3)
    at Layer.handle [as handle_request] (C:\Users\rober\ng\test-ssr\dist\server.js:123312:5)
A clear and concise description of the problem...

🔬 Minimal Reproduction

ng new test-ssr
cd test-ssr
ng add @nguniversal/express-engine --clientProject test-ssr
npm run build:ssr
npm run serve:ssr
# open http://localhost:4000 will show error
npm i @angular-devkit/build-angular@0.13.4
npm run build:ssr
npm run serve:ssr
# will work normally

🔥 Exception or Error


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

🌍 Your Environment


     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 7.3.5
Node: 11.9.0
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.4.0
typescript                        3.2.4
webpack                           4.29.0
@alan-agius4 alan-agius4 marked this as a duplicate of angular/universal#1139 Mar 10, 2019
@alan-agius4 alan-agius4 reopened this Mar 11, 2019
@alan-agius4 alan-agius4 marked this as not a duplicate of angular/universal#1139 Mar 11, 2019
@ngbot ngbot bot added this to the needsTriage milestone Mar 11, 2019
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Mar 11, 2019
@alan-agius4 alan-agius4 self-assigned this Mar 11, 2019
vikerman pushed a commit that referenced this issue Mar 11, 2019
…indows in server config

This changes fixes `Error: You must pass in a NgModule or NgModuleFactory to be bootstrapped`.

At the moment the check for absolute path is not correct for windows.

Fixes #13865 and fixes angular/universal#1139
vikerman pushed a commit that referenced this issue Mar 11, 2019
…indows in server config

This changes fixes `Error: You must pass in a NgModule or NgModuleFactory to be bootstrapped`.

At the moment the check for absolute path is not correct for windows.

Fixes #13865 and fixes angular/universal#1139
@robertisaacBBN
Copy link
Author

good morning @alan-agius4

when will this fix be published?

@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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants