環境
Node.js v8.11.3
Angular CLI 6.2.9 (@Angular/cli@6.2.9)
Ng Newで新規にAngular環境を構築
しただけなのに…
app.modules.tsを開くとエラーが発生している
エラー内容を抜き出してみた
This likely means that the library (@angular/platform-browser) which declares BrowserModule 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.
なにこれ?
いきなり結論
Angular Language Serviceが悪さをしていた
インストールバージョンを下げる
v12.0.0くらいにまで下げてみる
(下げたあと再起動を忘れずに)
エラー消えた
終わり
Node.jsとAngualr CLIの互換性やら、Ivyとの互換性やら
散々調べまくって、何度npm installやng updateを実行したことか…
という感じでした。
古いバージョンを扱うときは拡張機能の方にも注意してください。