为什么ng会导致角度错误?

时间:2019-11-18 16:16:51

标签: angular

使用ng serve运行时出现错误提示。

ERROR in Error: Error encountered resolving symbol values statically. Calling function 'OpaqueToken', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol FirebaseUserConfig in C:/Users/mohammad/Desktop/My Programming World/My SPA/My Angualr/pinterest/node_modules/angularfire2/tokens.d.ts, resolving symbol AngularFireModule.initializeApp in C:/Users/mohammad/Desktop/My Programming World/My SPA/My Angualr/pinterest/node_modules/angularfire2/angularfire2.d.ts, resolving symbol AppModule in C:/Users/mohammad/Desktop/My Programming World/My SPA/My Angualr/pinterest/src/app/app.module.ts, resolving symbol AppModule in C:/Users/mohammad/Desktop/My Programming World/My SPA/My Angualr/pinterest/src/app/app.module.ts
    at syntaxError (C:\Users\mohammad\Desktop\My Programming World\My SPA\My Angualr\pinterest\node_modules\@angular\compiler\bundles\compiler.umd.js:1513:34)
    at simplifyInContext (C:\Users\mohammad\Desktop\My Programming World\My SPA\My Angualr\pinterest\node_modules\@angular\compiler\bundles\compiler.umd.js:23316:23)
    at StaticReflector.simplify (C:\Users\mohammad\Desktop\My Programming World\My SPA\My Angualr\pinterest\node_modules\@angular\compiler\bundles\compiler.umd.js:23328:13)
    at StaticReflector.annotations (C:\Users\mohammad\Desktop\My Programming World\My SPA\My Angualr\pinterest\node_modules\@angular\compiler\bundles\compiler.umd.js:22794:60)
    at _getNgModuleMetadata (C:\Users\mohammad\Desktop\My Programming World\My SPA\My Angualr\pinterest\node_modules\@angular\compiler-cli\src\ngtools_impl.js:126:31)
    at _extractLazyRoutesFromStaticModule (C:\Users\mohammad\Desktop\My Programming World\My SPA\My Angualr\pinterest\node_modules\@angular\compiler-cli\src\ngtools_impl.js:101:26)
    at Object.listLazyRoutesOfModule (C:\Users\mohammad\Desktop\My Programming World\My SPA\My Angualr\pinterest\node_modules\@angular\compiler-cli\src\ngtools_impl.js:52:22)
    at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:\Users\mohammad\Desktop\My Programming World\My SPA\My Angualr\pinterest\node_modules\@angular\compiler-cli\src\ngtools_api.js:79:39)
    at AotPlugin._getLazyRoutesFromNgtools (C:\Users\mohammad\Desktop\My Programming World\My SPA\My Angualr\pinterest\node_modules\@ngtools\webpack\src\plugin.js:240:66)
    at C:\Users\mohammad\Desktop\My Programming World\My SPA\My Angualr\pinterest\node_modules\@ngtools\webpack\src\plugin.js:493:24
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

我厌倦了删除Firebase Angular,但是没有运气

该项目来自https://github.com/aviabird/pinterest/issues 有什么原因吗?

1 个答案:

答案 0 :(得分:0)

ng serve显示未导致

的错误

错误来自OpaqueToken,如错误消息中所述。 ng server只是显示错误消息。

错误:

  

调用函数'OpaqueToken',不支持函数调用。考虑使用对导出函数的引用替换函数或lambda,在C:/ Users / mohammad / Desktop / My Programming World / My SPA / My Angualr / pinterest / node_modules / angularfire2 / tokens.d.ts中解析符号FirebaseUserConfig

中的符号AngularFireModule.initializeApp