Angular 9 通用 - 运行错误 : can not read property 'type' of undefined - TokenStream

标签 angular rxjs server-side-rendering angular-universal

人才。

我正在从事 Angular 9 项目。

我最初的项目是 Angular 9、Node.js、Express 项目。

我将其转换为 Angular Universal。 enter image description here 当我运行“npm run dev:ssr”时,我看到了这种错误。

这是我的 package.json。

"@angular-redux/store": "^10.0.0",
"@angular/animations": "^9.1.4",
"@angular/cdk": "^9.2.2",
"@angular/common": "~9.1.4",
"@angular/compiler": "~9.1.4",
"@angular/core": "~9.1.4",
"@angular/forms": "~9.1.4",
"@angular/material": "^9.2.2",
"@angular/platform-browser": "~9.1.4",
"@angular/platform-browser-dynamic": "~9.1.4",
"@angular/platform-server": "~9.1.4",
"@angular/router": "~9.1.4",
"@nguniversal/express-engine": "^9.1.1",
"@ngx-translate/core": "^12.1.2",
"@ngx-translate/http-loader": "^4.0.0",
"express": "^4.17.1",
"graphql-js-client": "^0.12.0",
"jquery": "^3.5.1",
"js-base64": "^3.6.0",
"localstorage-polyfill": "^1.0.1",
"lodash": "^4.17.20",
"moment": "^2.29.1",
"ngx-device-detector": "^2.0.1",
"ngx-slick-carousel": "^0.5.1",
"ngx-toastr": "^12.0.1",
"node-fetch": "^2.6.1",
"npm-run-all": "^4.1.5",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8",
"redux-logger": "^3.0.6",
"redux-observable": "^1.2.0",
"rxjs": "~6.5.4",
"rxjs-compat": "^6.6.3",
"slick-carousel": "^1.8.1",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"

如果有人能帮助我,我将不胜感激。 问候!

最佳答案

也许对你来说有点无关紧要,但我也遇到了这个问题。 找不到解决办法,我尝试维护和修复图书馆。

https://github.com/angular-redux2/store https://www.npmjs.com/package/@angular-redux2/store

关于Angular 9 通用 - 运行错误 : can not read property 'type' of undefined - TokenStream,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65592602/

相关文章:

javascript - 如何将 RxJs 连接到 React 组件

angular - 异步管道在 Angular 的输入中不起作用

javascript - RxJs 管道和可出租运算符 `map` : 'this' context of type 'void' is not assignable to method's 'this' of type 'Observable<{}>'

next.js - 下一个js : server rendered code blocks highlighted by Prismjs mismatches and causes re-render due to leading whitespace on class attribute

javascript - Vue.js 服务器端渲染 : document is not defined

html - 如何在 Angular 中创建实时更新的绑定(bind)文本输入?

javascript - 刷新 id_token ADAL : Angular 4

javascript - 如何调度多个 action creator(React + Redux + 服务端渲染)

angular - 在 Angular 中,如果我导入一个共享模块但只需要其中的一件事,那会不会是一个不必要的巨大导入?

Angular 5 HttpInterceptor this.interceptor.intercept 不是一个函数