エンジン「ノード」はこのモジュールと互換性がありません。 期待されるバージョン 問題の解決策

コンポーネント ライブラリをインストールすると、常にエラーが報告されます。

E:\study\demo> yarn add
yarn install v1.22.17
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
warning url-loader@1.1.2: Invalid bin field for "url-loader".
error commander@9.0.0: The engine "node" is incompatible with this module. Expected version "^12.20.0 || >=14". Got "12.13.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

手動で右クリックしてnode_modulesフォルダーを削除し、npmキャッシュをクリアします。

npm cache clean --force

まだ機能しません。

後でオンラインで解決策を見つけました。エラーを無視してください。

ターミナル入力コマンド:

yarn config set ignore-engines true

次に、依存関係を再インストールし、プロジェクトを実行します。
ここに画像の説明を挿入

おすすめ

転載: blog.csdn.net/HH18700418030/article/details/129671931
おすすめ