Help needed with building a GSN dapp guide

Working through the building a GSN dapp guide and when I run npm start after creating the contract and funding the relayer I get the following error in the browser:

TypeError: Object(...) is not a function

App
src/App.js:8

   5 |    
   6 | function App() {   
   7 |   // get GSN web3>  
   8 |   const context = useWeb3Network(PROVIDER_URL, {   
   9 |     gsn: { dev: true }  
  10 |   });  
  11 | 
Windows Subsystem for Linux
node --version
v10.16.0
npm --version
6.11.2
openzeppelin --version
2.5.3

Hey @abcoathup. We had to remove React dependency from core package and it has been moved to submodule so you have to import it from react submodule

import { useWeb3Injected, useWeb3Network, useEphemeralKey } from '@openzeppelin/network/react';

I’ll update the guide today to be up to day.

3 Likes