Skip to content
Advertisement

Cannot destructure property ‘interface’ of ‘require(…)’ as it is undefined

I’m receiving this console error:

Cannot destructure property ‘interface’ of ‘require(…)’ as it is undefined.

Can somebody spot what is wrong?

Inbox.test.js file:

JavaScript

inbox.sol file: pragma solidity ^0.4.17;

JavaScript

compile.js file:

JavaScript

Advertisement

Answer

I would suggest you verify your project structure. Your compile.js must be in a parent folder of Inbox.test.js.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement