我最近将Angular 5项目更新为Angular 6,我一直在努力构建和部署。我的最新问题是导入问题 - 它之前工作正常。
错误现在在我的导入中说cannot find module 'firebase'
。
对于Angular 6+导入firebase核心和服务如下:
/*
* reduce the amount of code that your app uses by
* only including the features that you need.
*/
// import core firebase client (required)
import firebase from '@firebase/app';
// import Firebase Authentication (optional)
import '@firebase/auth';
// import Firebase Realtime Database (optional)
import '@firebase/database';
// import Cloud Firestore (optional)
import '@firebase/firestore';
Se official docs了解更多信息。