[SOLVED] Ver. 2.9.0 - Resolve ENS - [A0003] apiKey is not set

I’m trying to resolve the ENS Domain Name from the NFTcard in Ethereum boilerplate (Updated to work with ver. 2.9.0) when symbol returns ENS . . . I made a helper like this:

image

.env file and path is correct and works in all other components . . .
It seems it wants a header with the key but the SDK doesn’t allow this . . .
What am I missing here?

Console Error:

image

Checked previous similar issues but to no end . . .

Version 2 of the sdk is for backend and not for front end. For a recap app you have to use v1 of the sdk.

Could you elaborate on that? . . .
I placed the resolver under utils in src . . . and call it from the NFT card . . .

Should structure be different?

I mean that if this is a react only project then you should install v1 of the sdk and not v2 of the sdk. I’m not expert in react in particular.

It’s all Typescript and just updated everything to work with the new version so I’m not rolling back . . . I’m now trying to do it when I fetch the serverside props for NFT’s . . . We’ll see :slight_smile:

Hey @rePok,

do you still have any issue on your side? Any trouble or error did you encouter when migrating to v2 SDK?

Please let us know and we’ll help out as best as we can

Main problems migrating to ver. 2.9.0 was the little differences in paths to stuff in node modules and that you switched out and removed some stuff (And no documentation on this version yet) . . . However I made it work but am struggling a bit with getting the ENS name . . . I’m trying something new today, so I’ll keep you posted :slight_smile:

1 Like

Alright so I fixed the long way around like this:

image

And finally using it in the NFT card:

image

Working: :slight_smile:

2 Likes

Hey @rePok, glad you resolved this issue :raised_hands:

I would like to know which part are you referring by no documentation didn’t exist on the version yet?

Would like to know if there is any knowledge gap we can add in the documentation to help you use Moralis better :grinning_face_with_smiling_eyes:

Sorry for the late reply :slight_smile:
I only meant the slight differences like, links to Node Modules are not the same, and some of the code examples don’t work with the new version . . . I’ll elaborate when I have something concrete . . .

1 Like