'Error installing avalanche js in react app

I've been trying to embed avalanchejs into a new react projects. And ran into a few problems. Here's the Github to avalanchejs: https://github.com/ava-labs/avalanchejs In the ReadMe they suggest installing avalanchejs with yarn. Because I normally use npm with react I tried 3 things:

  1. Creating a new react project with npm then installing avalanchejs with yarn (possible conflicts between package managers).
  2. Creating a new react project with yarn then installing avalanchejs with yarn.
  3. Creating a new react project with npm then installing avalanchejs with npm. All 3 ways resulted in an error. Here are the 3 ways in more detail:

Terminal:

Terminal:

Terminal:



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source