らいふうっどの閑話休題

興味のあることをゆる~く書いていく

Angular をアップデートした時にData path '''' should NOT have additional properties の対処の覚書

Memo for dealing with Data path '' '' should NOT have additional properties when updating Angular

自分のポートフォリオサイトの Angular のバージョンを上げた時に下記エラーに遭遇しました。
I encountered the following error when upgrading the version of Angular on my portfolio site.

➜  portfolio git:(feature/next) ✗ npm run build

> portfolio@0.0.0 build /Users/lifewood/work/portfolio
> ng build --prod

Schema validation failed with the following errors:
  Data path "" should NOT have additional properties(es5BrowserSupport).
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! portfolio@0.0.0 build: `ng build --prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the portfolio@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/lifewood/.npm/_logs/2020-04-30T14_40_47_007Z-debug.log
➜  portfolio git:(feature/next) ✗ npm run build

更新時のバージョンは、下記の通り
The updated version is as follows

@angular/core@10.0.0-next.4
@angular/cli@10.0.0-next.3

ググったら、下記情報が。
If you googling, the following information is available.

stackoverflow.com

具体的な対応は、angular.json を修正します。
以下の行をコメントまたは削除する。

For concrete correspondence, modify angular.json.
Comment or delete the following lines

"es5BrowserSupport": true

これで、ビルドが成功するようになりました。
The build is now successful.