npm installで「npm ERR! Conflicting peer dependency: protractor@7.0.0」

今回はNode.js+Angular環境でnpm install時に下記のエラーが出たときの対処法についてお伝えしていこうと思います。

Node.jsのバージョンは20.9.0で、Angularのバージョンは17.3.8です。



npm installで「npm ERR! Conflicting peer dependency: protractor@7.0.0」

結論から言うと、package.jsonに書かれているライブラリのprotractorを除けばエラーは起きなくなります。

protractorは2023年の夏に廃止となりました。

We have news to share – Protractor is deprecated and will reach end-of-life by Summer 2023. To learn more and find out about other options please refer to this post on the Angular blog. Thank you for using and contributing to Protractor. https://goo.gle/state-of-e2e-in-angular

もしAngularのエンドツーエンドテストを自動化するためのテストフレームワークとしてprotractorを使っていた場合は、別のテストフレームワークを使うことを検討しましょう。

終わりに

今回はNode.js+Angular環境でnpm install時に表題のエラーが出たときの対処法についてお伝えいたしました。

最後までお読みいただきありがとうございます。
よろしければブログやTwitterでのシェアをお願いしております。
コメントもお待ちしております。
誤植や勘違いなどございましたらコメント欄にて教えていただけると幸いです。

直接契約ができるフリーランスエージェント「エンハンス」を立ち上げました。
詳しくは下記LPをご参照ください。
https://enhance.decryption.co.jp/

Youtubeチャンネル開設いたしました。
チャンネル登録者1000人を目指しているので、良いと思った方はチャンネル登録をお願いしたいです。
https://www.youtube.com/channel/UC219XhmSRxmXltTy6COxSMw






Node.js

Posted by ちこ