강의

멘토링

커뮤니티

Inflearn Community Q&A

entity's profile image
entity

asked

Creating an EOS Simple Wallet Using EOSJS

getInfo

API 조회에서 에러가 납니다.

Written on

·

268

0

const Eos = require('eosjs');

 

const config = {

    httpEndpoint: 'http://178.62.36.41:8888'

};

 

Eos(config).getInfo((error, info) => {

    if(error){

        console.error(error);

    }

 

    console.log(info);

});

 

 

결과가 아래와 같이 오류로 나옵니다.

다른 

HTTP API LIST를 사용해도 동일합니다.

 

TypeError: Eos is not a function

    at Object.<anonymous> (/Users/hyungsoolim/eos/getInfo.js:7:1)

    at Module._compile (internal/modules/cjs/loader.js:721:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)

    at Module.load (internal/modules/cjs/loader.js:620:32)

    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)

    at Function.Module._load (internal/modules/cjs/loader.js:552:3)

    at Function.Module.runMain (internal/modules/cjs/loader.js:774:12)

    at executeUserCode (internal/bootstrap/node.js:342:17)

    at startExecution (internal/bootstrap/node.js:276:5)

    at startup (internal/bootstrap/node.js:227:5)

blockchainjavascriptdappEOSJS

Answer 1

0

Dong Jun Kwon님의 프로필 이미지
Dong Jun Kwon
Instructor

eosjs를 설치 하셧나요? 설치 하셨으면 버젼이 20.으로 되면서 나는 부분이에요. 20.0으로 버젼 업이 퇴근에 되서요. 해당 강의는 v16.x 버젼으로 진행하셔야되요.

entity's profile image
entity

asked

Ask a question