0
0

AngularでBrowerModuleの謎のIvy互換性エラー

Posted at

環境

Node.js v8.11.3
Angular CLI 6.2.9 (@Angular/cli@6.2.9)

Ng Newで新規にAngular環境を構築

しただけなのに…

app.modules.tsを開くとエラーが発生している

image.png

image.png

エラー内容を抜き出してみた

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が悪さをしていた

きっと、みんなこれ入れてるでしょ?
image.png

インストールバージョンを下げる

v12.0.0くらいにまで下げてみる
(下げたあと再起動を忘れずに)
image.png

エラー消えた

image.png

終わり

Node.jsとAngualr CLIの互換性やら、Ivyとの互換性やら
散々調べまくって、何度npm installやng updateを実行したことか…
という感じでした。

古いバージョンを扱うときは拡張機能の方にも注意してください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0