[SOLVED] Throw new Error(`Not supported operation ${operationName}`); ^ Error: Not supported operation getNFTTrades

Can you provide me with more specific resources you’re using? Give me a link for the docs that you’re using

https://v1docs.moralis.io/moralis-dapp/getting-started/self-hosting-moralis-server/local-environment-setup

Hey @sandesh_walunj,

Can you tell me which step are you stuck in specifically? Which command or action did you take that causes you to get that error?

i just copied my friends last year project and there he uses the MoralisServerUrl and application Id which moralis firstly provides in dapp server’s.
so i just made server by following instruction of self hosted server.
and replaces all .env file data with my data and run command npm run start and this error is occured…

I see.

By any chance did you run yarn gen:cloud or npm run gen:cloud? This command should help you to generate cloud functions to call the APIs

i entered npm run gen:cloud but not working i got same error

Can you copy the logs from the npm run gen:cloud? Would like to see the full logs from that command

sure,parse-server-migration> npm run gen:cloud

[email protected] gen:cloud
ts-node ./scripts/generateCloudCode.ts
this is log generated after runnning command

Hmmm looks like so no error in here?

So a file should be generated from this command do you see any?

i got same above error again as generated when running npm run start command

I mean do you see any files generated from running yarn gen:cloud? Can you see any getNFTTrades cloud function file?

This is not referring to when you run npm run start

no i don’t see any files generated from running yarn gen:cloud

That certainly is strange :thinking: that likely is the source of the issue, since the file is never generated, the getNFTTrades function never exist and thus get that error

Do you have your code for this stored in a repository somewhere? I can have a quick check on that

have you checked it what’s wrong with this code

Hi @sandesh_walunj

Can you try the solution from this post. It looks like a similar issue.

const jsonFile = new Moralis.File('file.json', {
        base64: btoa(JSON.stringify({ name, description, image: imageURL }))
});

thanks server is running now but in here btoa is deprecated so what willl be the code here now…?

You can also replace it with window.btoa(). both will work.

Thanks problem is solved :grin::pray:

Oops! [C0013] Key “serverUrl” is unregistered.Have you registered all required modules?
this is serverUrl error what is this error