TypeError: Cannot read properties of undefined (reading 'FormatTypes') #6119
Replies: 4 comments 6 replies
-
Change second line to: const { fs } = require("fs"); |
Beta Was this translation helpful? Give feedback.
-
I fixed this by replacing this line-
with this line-
|
Beta Was this translation helpful? Give feedback.
-
This seems like works, but it prints abi wrongly, that's why didn't work for me. If anyone had the same thing; This fixed my issue. |
Beta Was this translation helpful? Give feedback.
-
In ethers 6, you can use the The line to write the contract ABI : fs.writeFileSync(FRONT_END_ABI_FILE, raffle.interface.formatJson()); |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am getting this when running -
to update the frontend to fill the abi.json file. The file paths are correct as the contractaddress.json file is being filled. Here is the code-
Beta Was this translation helpful? Give feedback.
All reactions