我试图将Angular 8应用程序设置为与SSR一起运行,但是当我使用时,我的延迟加载模块在webpack中触发了一些未定义的错误ng serve。在使用Angular 7之前,它运行良好,但是转到Angular 8时,一切都变了。这是我在运行时遇到的错误(在节点控制台中)
ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'call' of undefined
TypeError: Cannot read property 'call' of undefined
at __webpack_require__ (/Users/gwenaellarmet/Documents/Projects/ng-nouma/dist/server.js:137403:30)
at Function.requireEnsure [as e] (/Users/gwenaellarmet/Documents/Projects/ng-nouma/dist/server.js:137422:25)
at ?11 (/Users/gwenaellarmet/Documents/Projects/ng-nouma/dist/server.js:139660:6210)
at RouterConfigLoader.loadModuleFactory (/Users/gwenaellarmet/Documents/Projects/ng-nouma/dist/server.js:232758:39)
Run Code Online (Sandbox Code Playgroud)
我尝试更改一些tsconfig和angular.json配置,但是我总是遇到相同的错误。常春藤未启用,因为它还会在构建时触发一些错误。我认为它是链接的,但我不确定,所以现在我试图在没有常春藤的情况下使它工作
ERROR in src/app/pages/search/search.module.ts(68,12): error TS-991010: Value at position 12 in the NgModule.importss of SearchModule is not a reference: [object Object]
src/app/app.module.ts(41,12): error TS-991010: Value at position 6 in the NgModule.importss of AppModule is not a reference: [object Object]
Run Code Online (Sandbox Code Playgroud)
tsconfig.json …