我正在尝试将我的角度应用程序部署到AWS Lambda。 (https://medium.com/@maciejtreder/angular-serverless-a713e86ea07a)
我正在使用@ ng-toolkit / serverless和/ universal,但出现以下错误
"message": "Internal server error"
并在日志中
Unable to import module 'lambda': Error at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object.<anonymous> (/var/task/dist/server.js:118947:18) at __webpack_require__ (/var/task/dist/server.js:21:30) at Object.@angular/material/core (/var/task
Unable to import module 'lambda': Error
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/var/task/dist/server.js:118947:18)
at __webpack_require__ (/var/task/dist/server.js:21:30)
at Object.@angular/material/core (/var/task/dist/server.js:120656:18)
at __webpack_require__ (/var/task/dist/server.js:119533:30)
at Object../src/app/app.server.module.ngfactory.js (/var/task/dist/server.js:119903:11)
at __webpack_require__ (/var/task/dist/server.js:119533:30)
如果我从app.module.ts
中删除了以下程序,则该应用程序将正常运行。
MatInputModule,
MatCheckboxModule,
MatFormFieldModule
我不太确定下一步该怎么做/尝试,因为app.module.ts imports: []
中甚至只有一个与Angular Material相关的导入都会导致错误。