新米エンジニアの失敗再発防止メモ

自分そしてこの世界の皆が、同じ失敗をしないためのメモ

Twitterやってます!@rakuton_t
欲しいものリストのブタメンを送ってくれた方、ありがとうございます!

Angularのコンパイル時にエラー(firestoreモジュール利用)

エラーメッセージ

ERROR in node_modules/@angular/fire/firebase.app.module.d.ts(2,74): error TS2307: Cannot find module 'firebase/app'.
node_modules/@angular/fire/firestore/collection-group/collection-group.d.ts(2,27): error TS2307: Cannot find module 'firebase/app'.
node_modules/@angular/fire/firestore/collection/collection.d.ts(2,27): error TS2307: Cannot find module 'firebase/app'.
node_modules/@angular/fire/firestore/document/document.d.ts(5,27): error TS2307: Cannot find module 'firebase/app'.
node_modules/@angular/fire/firestore/firestore.d.ts(8,27): error TS2307: Cannot find module 'firebase/app'.
node_modules/@angular/fire/firestore/interfaces.d.ts(2,27): error TS2307: Cannot find module 'firebase/app'.

原因

firebaseモジュール がない

解決方法

簡単です。
以下のコマンドでfirebaseモジュールをインストールしてください。

npm install firebase

まとめ

Cannot find module '****'

というメッセージが表示されたらとりあえず

npm install ****

すれば大概は解決する。

私の記事が役に立ったら、どうぞ何か買ってください!→ Amazon欲しいものリスト