Reactで電卓を作る 1
Web系初心者であるわたくしが React勉強のため何か作る・・
といっても難しいので、以下のYouTubeと同じことを自分でもやってみる。
■ react-textfit のインストールでエラー
といっても難しいので、以下のYouTubeと同じことを自分でもやってみる。
■ react-textfit のインストールでエラー
"npm install react-textfit --save" でインストールしようとしたらエラーとなった。
とりあえす "npm install react-textfit --legacy-peer-deps" コマンドで強制的に(依存関係の衝突を無視して)インストールを行った。
PS D:\study\react\calc-4> npm install react-textfit --save npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: calc-4@0.1.0 npm error Found: react@19.1.0 npm error node_modules/react npm error react@"^19.1.0" from the root project npm error npm error Could not resolve dependency: npm error peer react@"^15.0.0 || ^16.0.0" from react-textfit@1.1.1 npm error node_modules/react-textfit npm error react-textfit@"*" from the root project npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps npm error to accept an incorrect (and potentially broken) dependency resolution. npm error npm error npm error For a full report see: npm error C:\Users\xxx\AppData\Local\npm-cache\_logs\2025-07-02T22_53_07_987Z-eresolve-report.txt npm error A complete log of this run can be found in: C:\Users\xxx\AppData\Local\npm-cache\_logs\2025-07-02T22_53_07_987Z-debug-0.logreact-textfitはメンテナンスされておらず、新しいreactには対応していないっぽい。
とりあえす "npm install react-textfit --legacy-peer-deps" コマンドで強制的に(依存関係の衝突を無視して)インストールを行った。
0 件のコメント:
コメントを投稿