简体   繁体   中英

Angular Errors on ng serve

when I try to run my angular application using ng serve I get these error:

Failed to compile. node_modules/angularfire2/angularfire2.d.ts(3,10): error TS2305: Module '"C:/Users/Dell/myProject/node_modules/rxjs/Subscription"' has no exported member 'Subscription'. node_modules/angularfire2/auth/auth.d.ts(3,10): error TS2305: Module '"C:/Users/Dell/myProject/node_modules/rxjs/Observable"' has no exported member 'Observable'. node_modules/angularfire2/database/interfaces.d.ts(2,10): error TS2305: Module '"C:/Users/Dell/myProject/node_modules/rxjs/Observable"' has no exported member 'Observable'. node_modules/angularfire2/database/list/audit-trail.d.ts(2,10): error TS2305: Module '"C:/Users/Dell/myProject/node_modules/rxjs/Observable"' has no exported member 'Observable'. node_modules/angularfire2/database/list/changes.d.ts(1,10): error TS2305: Module '"C:/Users/Dell/myProject/node_modules/rxjs/Observable"' has no exported member 'Observable'. node_modules/angularfire2/database/list/loaded.d.ts(3,10): error TS2305: Module '"C:/Users/Dell/myProject/node_modules/rxjs/Observable"' has no exported member 'Observable'. node_modules/angularfire2/database/list/snapshot-changes.d.ts(1,10): error TS2305: Module '"C:/Users/Dell/myProject/node_modules/rxjs/Observable"' has no exported member 'Observable'. node_modules/angularfire2/database/list/state-changes.d.ts(2,10): error TS2305: Module '"C:/Users/Dell/myProject/node_modules/rxjs/Observable"' has no exported member 'Observable'. node_modules/angularfire2/database/observable/fromRef.d.ts(2,10): error TS2305: Module '"C:/Users/Dell/myProject/node_modules/rxjs/Observable"' has no exported member 'Observable'. node_modules/angularfire2/firebase.app.module.d.ts(13,31): error TS2694: Namespace 'firebase' has no exported member 'firestore'. node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'. node_modules/rxjs/Subscription.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Subscription'.

I am making my first angular application following the tutorial from here Can anyone tell me what is the problem here as I have followed each step carefully up to the adding of bootstrap nav-bar. And then when I run it again it gives me these errors but before adding bootstrap it was running fine.

Your seem to use Angular6 with RxjS v6.xx but one of your libraries need rxjs-compat because it do not support the new rxjs v6 yet.

run in the directory where package.json is located:

npm i rxjs-compat -S

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM