import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import { BrowserRouter, Switch } from 'react-router-dom';
import { MoralisProvider } from 'react-moralis';
ReactDOM.render(
<React.StrictMode>
<BrowserRouter>
<Switch>
<MoralisProvider appId={process.env.REACT_APP_MORALIS_APPLICATION_ID} serverUrl={process.env.REACT_APP_MORALIS_SERVER_URL} >
<App />
</MoralisProvider>
</Switch>
</BrowserRouter>
</React.StrictMode>,
document.getElementById('root')
);
Compiling throws this Error
./src/index.jsModule not found: Can't resolve 'react-moralis' in 'C:\Users\jesse\Documents\Code\nifty\src'
Changing 'react-moralis' to 'moralis' (moralis is what my working implementation used)throws this error
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file itβs defined in, or you might have mixed up default and named imports.
P.S I have Moralis working with Moralis.Initialize... now trying to switch to MoralisProvider