GetScatter / scatter-js

Importable JavaScript library that allows web applications to directly interface with Scatter Desktop, Classic and Mobile.
MIT License
262 stars 148 forks source link

scatterjs_core__WEBPACK_IMPORTED_MODULE_10___default.a.scatter.eos is not a function #103

Closed treasersimplifies closed 5 years ago

treasersimplifies commented 5 years ago

My eosjs version : 16.0.9 Trying to use ScatterJS to login my local network accounts(SUCCESS) and push some actions(but get the following error):

Uncaught (in promise) TypeError: scatterjs_core__WEBPACK_IMPORTED_MODULE_10___default.a.scatter.eos is not a function

ScatterLogin._callee6$
src/components/ScatterLogin.js:239
    236 | }
    237 | //please change contract_name to your contract account
    238 | let contract_name = 'bh';
>   239 | let eos = ScatterJS.scatter.eos(this.network, Eos);
    240 | ^ 
    241 | try{
    242 |     let data = {
nsjames commented 5 years ago

Looks like the eosjs plugin wasn't set up correctly. Can you show me more of the code? (mainly the top-level imports and ScatterJS instantiation code)

treasersimplifies commented 5 years ago

Looks like the eosjs plugin wasn't set up correctly. Can you show me more of the code? (mainly the top-level imports and ScatterJS instantiation code)

What a terrible newbird I am. :(
I just found out that I missed ScatterJS.plugins(new ScatterEOS()); . It's alright now. Thank you. :)

nsjames commented 5 years ago

It's the small things in life :)