0
D
drpeck

Fix for ReferenceError: require is not defined

CURRENT:
src=”https://cdn.ethers.io/scripts/ethers-app-v0.4.min.js”
using” var provider = ethers.getDefaultProvider();
gives Browser Console   getDefaultProvider not a function
LEGACY:
src=”https://cdn.ethers.io/scripts/ethers-v3.min.js”
 using:  var ethers = require(‘ethers’);
gives Browser Console: ReferenceError: require is not defined

connected to –> https://ropsten.ethers.io/#!/app-link-insecure/127.0.0.1:8080/

ethers-deploy serve is returning:
OK: / => ./index.html (1527 bytes)

$ npm list -depth=0
myfirstEtherio@1.0.0 /home/drp/Documents/blockgeeks/myfirstEtherio
├── browserify@16.3.0
├── ethers@4.0.33
├── ethers-cli@4.0.0
└── npm@6.10.1

Guidance please.