An error occurred when I ran "ethereum-react-native-boilerplate"

TypeError: moralis_react_native__WEBPACK_IMPORTED_MODULE_3___default.a.setAsyncStorage is not a function

import Moralis from “moralis/react-native.js”;
Adding “.js” solved the issue
But.

TypeError: Moralis.Web3 is not a constructor

1 Like

We are looking into this right now. Will let you know once the fix is pushed asap

1 Like

Same issue here! Unable to run the react nativ boilerplate due to TypeError: Moralis.Web3 is not a constructor

I did have the same issue, the solution was to set the environment properly for MoralisProvider.

const environment = Platform.OS === "web" ? "browser" : "native";
<MoralisProvider
        appId={appId}
        serverUrl={serverUrl}
        environment={environment}>