Discussions
ECMA script not a constructor error
22 days ago by Alain Doutre
Hi I use ECMA script and as per the instructions I have these two lines:
import MonsterApiClient from "monsterapi"
const client = new MonsterApiClient(apikey)
When I run I get this error:
server-1 |const client = new MonsterApiClient(apikey)
server-1 | ^
server-1 |
server-1 | TypeError: MonsterApiClient is not a constructor
What am I doing wrong? Please advise.