我正在使用Angular和firebase构建一个Web应用程序,我已经设置了所有内容并导入了所需的模块,并尝试运行ng build --prod命令,然后得到以下错误。
Warning: Entry point '@angular/fire' contains deep imports into 'C:/Users/Hello/eShop/node_modules/firebase/app'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
Warning: Entry point '@angular/fire/auth' contains deep imports into 'C:/Users/Hello/eShop/node_modules/firebase/app'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
Warning: Entry point '@angular/fire/auth-guard' contains deep imports into 'C:/Users/Hello/eShop/node_modules/firebase/app'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
Warning: Entry point '@angular/fire/database' contains deep imports into 'C:/Users/Hello/eShop/node_modules/firebase/database', 'C:/Users/Hello/eShop/node_modules/firebase/app'. This is probably not a problem, but may
cause the compilation of entry points to be out of order.
Warning: Entry point '@angular/fire/firestore' contains deep imports into 'C:/Users/Hello/eShop/node_modules/firebase/app'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
Warning: Entry point '@angular/fire/functions' contains deep imports into 'C:/Users/Hello/eShop/node_modules/firebase/app'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
Warning: Entry point '@angular/fire/messaging' contains deep imports into 'C:/Users/Hello/eShop/node_modules/firebase/app'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
Warning: Entry point '@angular/fire/performance' contains deep imports into 'C:/Users/Hello/eShop/node_modules/firebase/app'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
Warning: Entry point '@angular/fire/remote-config' contains deep imports into 'C:/Users/Hello/eShop/node_modules/firebase/app'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
Warning: Entry point '@angular/fire/storage' contains deep imports into 'C:/Users/Hello/eShop/node_modules/firebase/storage', 'C:/Users/Hello/eShop/node_modules/firebase/app'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
Warning: Entry point 'angularfire2' contains deep imports into 'C:/Users/Hello/eShop/node_modules/firebase/app', 'C:/Users/Hello/eShop/node_modules/rxjs/Observable'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
ERROR in node_modules/angularfire2/database/database.module.d.ts:15:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.
This likely means that the library (angularfire2/database) which declares AngularFireDatabaseModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
15 export declare class AngularFireDatabaseModule {
~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/angularfire2/auth/auth.module.d.ts:15:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.
This likely means that the library (angularfire2/auth) which declares AngularFireAuthModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
15 export declare class AngularFireAuthModule {
~~~~~~~~~~~~~~~~~~~~~
将angularfire2校正为@ angular / fire后,我遇到另一个错误。
ERROR in ./node_modules/@angular/fire/__ivy_ngcc__/fesm2015/angular-fire.js 166:8-19
"export 'subscribeOn' was not found in 'rxjs/operators'
at HarmonyImportSpecifierDependency._getErrors (C:\Users\Hello\eShop\node_modules\webpack\lib\dependencies\HarmonyImportSpecifierDependency.js:109:11)
at HarmonyImportSpecifierDependency.getErrors (C:\Users\Hello\eShop\node_modules\webpack\lib\dependencies\HarmonyImportSpecifierDependency.js:68:16)
at Compilation.reportDependencyErrorsAndWarnings (C:\Users\Hello\eShop\node_modules\webpack\lib\Compilation.js:1463:22)
at C:\Users\Hello\eShop\node_modules\webpack\lib\Compilation.js:1258:10
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\Hello\eShop\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:42:1)
at AsyncSeriesHook.lazyCompileHook (C:\Users\Hello\eShop\node_modules\tapable\lib\Hook.js:154:20)
at Compilation.finish (C:\Users\Hello\eShop\node_modules\webpack\lib\Compilation.js:1253:28)
at C:\Users\Hello\eShop\node_modules\webpack\lib\Compiler.js:672:17
at _done (eval at create (C:\Users\Hello\eShop\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
at eval (eval at create (C:\Users\Hello\eShop\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:36:22)
at C:\Users\Hello\eShop\node_modules\webpack\lib\Compilation.js:1185:12
at C:\Users\Hello\eShop\node_modules\webpack\lib\Compilation.js:1097:9
at processTicksAndRejections (internal/process/task_queues.js:76:11)
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi ./src/main.ts