maciejtreder / ng-toolkit

:star: Angular tool-box! Start your PWA in two steps! Add Serverless support for existing projects and much more
https://www.angular-universal-pwa.maciejtreder.com
MIT License
1.12k stars 156 forks source link

After upgrade to angular 9, no longer able to push to lambda #780

Open thenetimp opened 4 years ago

thenetimp commented 4 years ago

I'm submitting a...


[x ] Bug report  
[ ] Feature request
[] Documentation issue or request

In package


[ ] @ng-toolkit/init
[x ] @ng-toolkit/serverless
[x ] @ng-toolkit/universal
[ ] @ng-toolkit/pwa
[ ] @ng-toolkit/firebug

Current behavior

Lambda errors with

Error: You must pass in a NgModule or NgModuleFactory to be bootstrapped at View.engine (/var/task/dist/server.js:6810:2035487) at View.render (/var/task/dist/server.js:17431:8) at tryRender (/var/task/dist/server.js:16762:10) at Function.render (/var/task/dist/server.js:16714:3) at ServerResponse.render (/var/task/dist/server.js:21434:7) at module.exports.app.get (/var/task/dist/server.js:10325:9) at Layer.handle [as handle_request] (/var/task/dist/server.js:8847:5) at next (/var/task/dist/server.js:8666:13) at Route.dispatch (/var/task/dist/server.js:8641:3) at Layer.handle [as handle_request] (/var/task/dist/server.js:8847:5)

Expected behavior

Successful deployment to lambda

Minimal reproduction of the problem with instructions

Example repository

What is the motivation / use case for changing the behavior?

Environment


Angular version: 9.0.4

- Node version: 10.x (whatever amazon is using)
- Platform:  AWS Lambda

Others:

Just upgraded from 8 to 9 and everything works locally, but something is now not working with pushing to lambda. the server.ts was created by ng-toolkit which is why I am asking about the problem here to see if anyone else has had the problem and if they know how to fix it.

KingDarBoja commented 4 years ago

Hi @thenetimp,

Haven't tested the new Angular 9 with ng-toolkit, but I will get some free time to update my working example repo and come back if there is any issue with deployment.

veslav3 commented 4 years ago

@thenetimp @KingDarBoja I have the same thing for Google firebase. It might be the Node.js version?

tspicer commented 4 years ago

Any updates on this one? Thanks!

veslav3 commented 4 years ago

@tspicer not really, I did see the same thing on firebase as well. (google cloud functions) So I am guessing there's a change required in either the angular codebase or the ng-toolkit one.

tspicer commented 4 years ago

@veslav3 Thanks for the update. I will sit tight until there is something formal on v9 support

Sangram9693 commented 4 years ago

Hi Team,

i am also facing same issue. Can anyone help me on this ?

veslav3 commented 4 years ago

@Sangram9693 I still have not updated yet. -.-