UserStore.deployed() should return the instance of the contract
Node Error: Method [object Object] not supported.
import TruffleContract from "truffle-contract";const Web3 = require("web3"); const UserStoreArtifact = require("artifact.json");const web3 = new Web3(
new Web3.providers.HttpProvider(`http://localhost:${8545}`)
);
UserStore.setProvider(web3.currentProvider);const ins = await UserStore.deployed();
NPM - 6.4.1
Node - 10.15.1
Web3.js - 1.0.0-beta.37
OS - Windows 10
Device - Dell 7577
While using truffle console, I am able to get the Instance of the contract.
Thanks for submitting this issue. As I see from the error message you are using a version higher then beta.37. Truffle does currently only support until version beta.37 of the Web3.js library.
Please be sure you are using the right version.
Thanks for submitting this issue. As I see from the error message you are using a version higher then beta.37. Truffle does currently only support until version beta.37 of the Web3.js library.
Please be sure you are using the right version.
But he use exactly version beta.37 !
鍚屻仒鍟忛銇岀櫤鐢熴仐銇︺亜銇俱仚
Most helpful comment
Thanks for submitting this issue. As I see from the error message you are using a version higher then beta.37. Truffle does currently only support until version beta.37 of the Web3.js library.
Please be sure you are using the right version.