0

I'm trying to connect my smart contracts to a frontend app using web3 and the truffle-contract node package. In my client-side javascript file, I am requiring the package as follows:

import contract from "truffle-contract";

However, when I load my webpage in the browser, I see the following console error:

vendor.js:61 Uncaught Error: Cannot find module 'debug' from 'truffle-contract/lib/contract.js'

I've already installed truffle-contract with yarn at version ^4.0.2. I'm using Truffle version v5.0.1 . Why is contract.js missing?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.