Angularのバージョンアップ(6.1.10→7.x)
5→6に引き続き、Angular Update Guide に従い対応してみる。
https://update.angular.io/#6.0:7.0
TypeScript が 2.9 → 3.1 へ
Breaking changes ありとのこと。
さらっとサイトを見てみたが、どれが該当するのかよく分からなかった。
Node 10 をサポート
まぁ急いでバージョンアップする必要もないので見送り。
ng update
ng update @angular/cli@7 @angular/core@7
エラー。
Package "@ng-bootstrap/ng-bootstrap" has an incompatible peer dependency to "@angular/core" (requires "^5.0.2" (extended), would install "7.2.16"). Package "@ng-bootstrap/ng-bootstrap" has an incompatible peer dependency to "@angular/common" (requires "^5.0.2" (extended), would install "7.2.16"). Package "@ng-bootstrap/ng-bootstrap" has an incompatible peer dependency to "@angular/forms" (requires "^5.0.2" (extended), would install "7.2.16"). Incompatible peer dependencies found. See above.
ng-bootstrap のバージョンを上げるか。ここを見る限り、4.x にすれば良さそう。というか、そもそも使っているのだろうか?
<ngb で検索したが、ヒットしなかったため、やっぱり使っていなさそう。app.module.ts から参照を削除し、yarn remove @ng-bootstrap/ng-bootstrap した。
で、再度 ng update。
前に見たことあるようなエラー。
npm ERR! path .../node_modules/npm/node_modules/dezalgo/node_modules/asap npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall rename npm ERR! enoent ENOENT: no such file or directory, rename '.../node_modules/npm/node_modules/dezalgo/node_modules/asap' -> '.../node_modules/npm/node_modules/dezalgo/node_modules/.asap.DELETE' npm ERR! enoent This is related to npm not being able to find a file.
rm -rf node_modules/ してから yarn すると成功。
ng serve
すんなりビルドできて正常に動いていそう。6 → 7 はだいぶ楽だった。
コメントを残す