WARNING in ./node_modules/Firebase/dist/index.cjs.js
angular で Firebase を使ったときに起こったWARNING
解決しないと実行できません。。
[ng] WARNING in ./node_modules/Firebase/dist/index.cjs.js [ng] There are multiple modules with names that only differ in casing. [ng] This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. [ng] Use equal casing. Compare these module identifiers: [ng] * /<path>/node_modules/Firebase/dist/index.cjs.js [ng] Used by 5 module(s), i. e. [ng] /<path>/node_modules/@ngtools/webpack/src/index.js!/<path>/src/app/detail/detail.page.ts [ng] * /<path>/node_modules/firebase/dist/index.cjs.js [ng] Used by 5 module(s), i. e. [ng] /<path>/node_modules/@ngtools/webpack/src/index.js!/<path>/src/app/app.component.ts [ng] ℹ 「wdm」: Compiled with warnings.
ワーニングの内容は
複数のモジュールで名前がケースによって異なる
大文字、小文字のファイルをコンパイルすると、予期しない動作につながる可能性がある
といった感じ。
detail.page.ts
のfirebaseのimport記述を確認したところ
import * as firebase from 'Firebase';
となっていた。
警告通り、大文字Fを小文字fに変更してみた
import * as firebase from 'Firebase';
そして実行。
[ng] WARNING in ./node_modules/Firebase/dist/index.cjs.js [ng] There are multiple modules with names that only differ in casing. [ng] This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. [ng] Use equal casing. Compare these module identifiers: [ng] * /<path>/node_modules/Firebase/dist/index.cjs.js [ng] Used by 3 module(s), i. e. [ng] /<path>/node_modules/@ngtools/webpack/src/index.js!/<path>/src/app/create/create.page.ts [ng] * /<path>/node_modules/firebase/dist/index.cjs.js [ng] Used by 7 module(s), i. e. [ng] /<path>/node_modules/@ngtools/webpack/src/index.js!/<path>/src/app/app.component.ts [ng] ℹ 「wdm」: Compiled with warnings.
modulesの数字が変化した。
解決したのか?
同様に create.page.ts
のimportも修正し実行。
[ng] Date: 2018-09-28T02:05:58.160Z - Hash: ff79b76efc66c6cf0588 - Time: 8958ms [ng] 176 unchanged chunks [ng] chunk {create-create-module} create-create-module.js, create-create-module.js.map (create-create-module) 9.08 kB [rendered] [ng] ℹ 「wdm」: Compiled successfully.
無事解決 ヽ(^o^)丿
githubに載っていたものを参考にしたんだけど。。。
Firebaseの「F」の大文字が原因だったのか?