I am trying to deploy angular web app on AWS serverless Lambda following the tutorial https://medium.com/better-programming/getting-started-with-serverless-angular-universal-on-aws-lambda-8754bcc4dc19
It was working fine till last week, but started to throw error "Error: Cannot find module '@vendia/serverless-express'" even though there is no mention of '@vendia/serverless-express' anywhere. The generated lambda.js uses'aws-serverless-express'.
Installed '@vendia/serverless-express' through npm, it got added to package.json. Deployed post that, still error is reported.
Steps to reproduce:
- Ensure angular version is 7 or less as toolkit doesn't work with higher version
- ng new project-name --style css --routing false
- cd project-name
- ng add @ng-toolkit/[email protected]
- npm run build:prod
- npm run server
- ng add @ng-toolkit/[email protected]
- npm i serverless-api-compression
- npm run build:serverless:deploy
Let me know in case of any further information required. Thanks in advance!