update-front-end.js problem #4585
Replies: 3 comments 3 replies
-
@WillStansill Try adding this |
Beta Was this translation helpful? Give feedback.
-
change paths to
if it doesn't work please show your nextjs-smartcontract-lottery repo |
Beta Was this translation helpful? Give feedback.
-
Hello @WillStansill When creating such file we need to add I have automated this process and if there is no such file we can create one by using below script: module.exports = async function () {
if (process.env.UPDATE_FRONT_END) {
console.log("Updating Front End...")
// We are checking if proper file exists
if (!fs.existsSync(FRONT_END_ADDRESSES_FILE)) {
// We need to add {} to specify .json format in created file, otherwise updateContractAddresses() function won't work if file will be just empty for example
fs.writeFileSync(FRONT_END_ADDRESSES_FILE, "{}")
updateContractAddresses()
} else {
updateContractAddresses()
}
updateAbi()
}
} As you can see I'm specifying to create this file with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/WillStansill/hardhat-smartcontract-lottery

hey guys I'm about half way through the course and im running into the issue that can be seen in my image below. I have made sure that FRONT_END_ADDRESS_FILE is directed towards the correct location. If anyone could offer some assistance I would be incredibly appreciative. Thankyou!
Beta Was this translation helpful? Give feedback.
All reactions