プログラミング
ラボ環境にサーバ追加して以来しばらく放置していた。やりたい事があり、本日新しいプロジェクトを作成したらエラーが出力された。
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: cli-demo1@0.0.0
npm ERR! Found: jasmine-core@3.7.1
npm ERR! node_modules/jasmine-core
npm ERR! dev jasmine-core@"~3.7.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer jasmine-core@">=3.8" from karma-jasmine-html-reporter@1.7.0
npm ERR! node_modules/karma-jasmine-html-reporter
npm ERR! dev karma-jasmine-html-reporter@"^1.5.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/bar/.npm/eresolve-report.txt for a full report.
package.jsonの下記を修正してnpm installした。エラーは解決したものの、こまごまと変更があったようで調査したいと思っている。日々環境作りをしている訳でもないため、このようなことは往々にして発生するものだ。以前よりは情報収集しやすくなったのは幸いな事だと考えるようにしている。情報を整理できたら少しづつ別のエントリに記載してゆきたい。
"devDependencies": {
"@angular-devkit/build-angular": "~12.0.3",
"@angular/cli": "~12.0.3",
"@angular/compiler-cli": "~12.0.3",
"@cypress/schematic": "^1.4.2",
"@types/jasmine": "~3.7.0",
"@types/node": "^12.11.1",
"jasmine-core": "~3.7.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
// karma-jasmine-html-reporter: "^1.5.0"
"karma-jasmine-html-reporter": "~1.5.0", // ここを修正
"typescript": "~4.2.3",
"cypress": "7.7.0"
}
ラボ環境のバージョン:
Angular CLI: 12.0.5
Node: 16.3.0
Package Manager: npm 7.19.1
OS: linux x64
Angular: 12.0.5
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1200.5
@angular-devkit/build-angular 12.0.5
@angular-devkit/core 12.0.5
@angular-devkit/schematics 12.0.5
@schematics/angular 12.0.5
rxjs 6.6.7
typescript 4.2.4
やりたいことをそのままに構成を組むと、ラボ環境がリソース不足に陥るため次の打ち手を考えておきたい。諸々のツールも拡充したいため検討事項がそれなりにあることに気づけたのは本日の収穫だ。
いいね!