ค้นหาเว็บไซต์

node.js - ข้อผิดพลาด AngularCli เหล่านี้หมายความว่าอะไร เมื่อไม่มีการตรวจพบ "ปัญหา" ใน VsCode?


ประการแรก นี่เป็นคำถามติดตามผลจากที่นี่:

และ.... อย่างที่สอง ฉันกำลังเจอแต่ข้อผิดพลาดเหล่านี้ใน Terminal โดยบังเอิญนะ ฉันไม่ได้ใหม่กับ Angular มาก แต่ใหม่กับ FireStore และ Firebase มาก :)

ฉันได้สร้างบัญชีกับ Firebase เป็นครั้งแรก และฉันคิดว่าฉันได้คัดลอกข้อมูล api ทั้งหมดมาอย่างถูกต้อง และเมื่อฉันดูใน VsCode ก็ไม่พบปัญหาใดๆ อย่างไรก็ตาม ฉันสงสัยว่าทำไมไม่มีอะไรปรากฏใน localhost เลย... ดังนั้นฉันจึงตรวจสอบในเทอร์มินัล ของบรรทัดคำสั่ง และนี่คือข้อผิดพลาดบางอย่างที่ปรากฏขึ้น

นี่คือขั้นตอนบางส่วนที่ฉันทำ:

  • ลบโมดูลโหนดแล้ว
  • ล้างแคชของ npm --force
  • ติดตั้ง npm

แต่แล้วฉันก็ยังคงเจอข้อผิดพลาดเหมือนเดิม!

Build at: 2021-07-19T15:14:31.757Z - Hash: 1d1a58a540ce70023842 - Time: 20427ms

Warning: D:\WEBSITES\Projects\clientpanel\node_modules\angularfire2\node_modules\@angular\fire\__ivy_ngcc__\es2015\firebase.app.module.js depends on 'firebase/app'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: D:\WEBSITES\Projects\clientpanel\node_modules\firebase\firestore\dist\index.esm.js depends on '@firebase/firestore'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: D:\WEBSITES\Projects\clientpanel\src\app\app.module.ts depends on 'angularfire2'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: D:\WEBSITES\Projects\clientpanel\src\app\app.module.ts depends on 'angularfire2/auth'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: D:\WEBSITES\Projects\clientpanel\src\app\app.module.ts depends on 'angularfire2/firestore'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies



Error: node_modules/angularfire2/node_modules/@angular/core/core.d.ts:219:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵFactoryDeclaration'.

219     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<ApplicationInitStatus, [{ optional: true; }]>;
                            ~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/core/core.d.ts:220:26 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵInjectableDeclaration'.

220     static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<ApplicationInitStatus>;
                             ~~~~~~~~~~~~~~~~~~~~~~~



Error: node_modules/angularfire2/node_modules/@angular/core/core.d.ts:750:26 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵInjectableDeclaration'.

750     static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<Compiler>;
                             ~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/core/core.d.ts:5066:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵFactoryDeclaration'.

5066     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<PlatformRef, never>;
                             ~~~~~~~~~~~~~~~~~~~~

Error: node_modules/angularfire2/node_modules/@angular/core/core.d.ts:5067:26 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵInjectableDeclaration'.

5067     static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<PlatformRef>;
                              ~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/core/core.d.ts:6454:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵFactoryDeclaration'.

6454     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<SystemJsNgModuleLoader, [null, { optional: true; }]>;
                             ~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/core/core.d.ts:6455:26 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵInjectableDeclaration'.

6455     static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<SystemJsNgModuleLoader>;
                              ~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/core/core.d.ts:6651:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵFactoryDeclaration'.

6651     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<Testability, never>;
                             ~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/core/core.d.ts:6652:26 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵInjectableDeclaration'.

6652     static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<Testability>;
                              ~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/core/core.d.ts:6696:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵFactoryDeclaration'.

6696     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<TestabilityRegistry, never>;
                             ~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/core/core.d.ts:9639:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵFactoryDeclaration'.

9639     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<ɵConsole, never>;
                             ~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/core/core.d.ts:9640:26 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/src/r3_symbols"' has no exported member 'ɵɵInjectableDeclaration'.

9640     static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<ɵConsole>;
                              ~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/fire/auth/auth.d.ts:13:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

13     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<AngularFireAuth, [null, { optional: true; }, null, null]>;
                           ~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/fire/auth/auth.d.ts:14:26 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectableDeclaration'.

14     static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<AngularFireAuth>;
  m                          ~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/fire/auth/auth.module.d.ts:4:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

4     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<AngularFireAuthModule, never>;
                          ~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/fire/auth/auth.module.d.ts:5:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.

5     static ɵmod: ɵngcc0.ɵɵNgModuleDeclaration<AngularFireAuthModule, never, never, never>;
                          ~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/fire/auth/auth.module.d.ts:6:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.

6     static ɵinj: ɵngcc0.ɵɵInjectorDeclaration<AngularFireAuthModule>;
                          ~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/fire/firebase.app.module.d.ts:48:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

48     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<AngularFireModule, never>;
                           ~~~~~~~~~~~~~~~~~~~~


Error: [0mnode_modules/angularfire2/node_modules/@angular/fire/firebase.app.module.d.ts:49:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.

49     static ɵmod: ɵngcc0.ɵɵNgModuleDeclaration<AngularFireModule, never, never, never>;
                           ~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/fire/firebase.app.module.d.ts:50:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.

50     static ɵinj: ɵngcc0.ɵɵInjectorDeclaration<AngularFireModule>;
                           ~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/fire/firestore/firestore.d.ts:30:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

30     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<AngularFirestore, [null, { optional: true; }, { optional: true; }, { optional: true; }, null, null, { optional: true; }]>;
                           ~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/fire/firestore/firestore.d.ts:31:26 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectableDeclaration'.

31     static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<AngularFirestore>;
                            ~~~~~~~~~~~~~~~~~~~~~~~


0mError: node_modules/angularfire2/node_modules/@angular/fire/firestore/firestore.module.d.ts:7:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

7     static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<AngularFirestoreModule, never>;
                          ~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/fire/firestore/firestore.module.d.ts:8:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.

8     static ɵmod: ɵngcc0.ɵɵNgModuleDeclaration<AngularFirestoreModule, never, never, never>;
                          ~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angularfire2/node_modules/@angular/fire/firestore/firestore.module.d.ts:9:25 - error TS2694: Namespace '"D:/WEBSITES/Projects/clientpanel/node_modules/angularfire2/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.

9     static ɵinj: ɵngcc0.ɵɵInjectorDeclaration<AngularFirestoreModule>;
                          ~~~~~~~~~~~~~~~~~~~~~

คำตอบ #1

คุณติดตั้งไลบรารี Angular ที่ไม่ได้ใช้อีกต่อไปแล้ว - angularfire2 ตอนนี้คือ @angular/fire

ลองใช้สิ่งนี้จากหน้าต่างเทอร์มินัลหรือหน้าต่างคำสั่ง

npm uninstall angularfire2
npm uninstall @angular/fire
npm uninstall firebase

ในโมดูลของคุณที่คุณกำลังนำเข้า Angular Fire ให้ตรวจสอบให้แน่ใจว่าคุณได้ลบการอ้างอิงใด ๆ ไปยังมัน จากนั้นพิมพ์

ng add @angular/fire 
npm install 
npm install firebase