angular - 启动我的项目时出错(运行 ng serve 之后)

标签 angular node-modules

我从我正在学习的在线 MOOC 下载了该项目的 zip 文件。到现在为止一切正常,但现在我遇到了如下所述的错误:-

我尝试再次运行 ng serve 并再次运行 npm install 但每次我都遇到以下错误:

ERROR in node_modules/rxjs-compat/operator/shareReplay.d.ts(2,10): error TS2305: Module '"/Users/ratnabhkumarrai/Downloads/prj-http-final 3/node_modules/rxjs/internal-compatibility/index"' has no exported member 'ShareReplayConfig'.

import { Observable, SchedulerLike } from 'rxjs';
import { ShareReplayConfig } from 'rxjs/internal-compatibility';
/**
* @method shareReplay
* @owner Observable
*/
export declare function shareReplay<T>(this: Observable<T>, config: 
ShareReplayConfig): Observable<T>;
export declare function shareReplay<T>(this: Observable<T>, 
bufferSize?: number, windowTime?: number, scheduler?: SchedulerLike): 
Observable<T>;

最佳答案

我不得不降级 rxjs-compat 并且能够通过它。

"rxjs-compat": "6.3.3"

关于angular - 启动我的项目时出错(运行 ng serve 之后),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54491147/

相关文章:

angular - 在 Angular 中单击 'None of the above option' 时,有没有办法重置复选框项目的其余部分?

node.js - 基本问题生产中的第一个 Node+express+Angular 应用程序

npm - 为什么我的 npm_modules 文件夹在 VS Code 中都突出显示为红色?

typescript - 无法使用 JSX,除非我在执行yarn start 时提供了 '--jsx' 标志

node.js - 错误 TS2339 : Property 'use' does not exist on type express "Application"

javascript - 关闭模态之前保存/取消提示(当模态已通过 ESC/单击背景关闭时)

*ngFor 中的 Angular 复选框

node.js - 在 npm 包全局安装上获取 "npm ERR! code EPEERINVALID"

javascript - Node.js module.exports 一个带有输入的函数

angular - Angular2 的 Kendo UI - 网格如何动态添加列