I’m just trying to initialize a project. So I run the usual yarn create react-app my-app --template typescript
Then cd into the project’s main folder
I then want to add Moralis so I do yarn add moralis react-moralis
In index.tsx I import MoralisProvider from react-moralis and wrap my app in it, as I’ve done several times before while following tutorials etc.
The project compiles but with the following warnings:
But I can continue, so I do. I then want to add Web3UIKit to the project so I run yarn add web3uikit
Once I do that, I get a bajillion errors and my localhost browser window looks like this:
Am I missing something? If I remove the MoralisProvider tags, all the errors go away but obviously I want to use Moralis and Web3UiKit.
As you can see from the page behind all the errors, I’ve made no other changes to the project. It’s a blank react project and I’ve outlined all the steps I’ve taken and I feel like I shouldn’t be seeing these errors. Any suggestions would be greatly appreciated!
Here’s the code. The same thing happens whether I fill in the server details or not. And whether I create the project using Typescript or not:
import React from "react";
import ReactDOM from "react-dom/client";
import "./index.css";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
import { MoralisProvider } from "react-moralis";
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<React.StrictMode>
<MoralisProvider serverUrl="xxxxx" appId="xxxxx">
<App />
</MoralisProvider>
</React.StrictMode>
);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();