Error when trying to setup self hosted server

Hello everyone,

I am trying to follow the tutorial to setup a self hosted server :

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

but when i reach the step of running the server, i get this error :

PS C:\Users\esteban\Desktop\WORK\-- LORENZO --\moralis server\v3> yarn dev            
yarn run v1.22.19
$ ts-node src/index.ts
warn: DeprecationWarning: The Parse Server option 'directAccess' default will change to 'true' in a future version. Additionally, the environment variable 'PARSE_SERVER_ENABLE_EXPERIMENTAL_DIRECT_ACCESS' will be deprecated and renamed to 'PARSE_SERVER_DIRECT_ACCESS' in a future version; it is currently possible to use either one.
warn: DeprecationWarning: The Parse Server option 'enforcePrivateUsers' default will change to 'true' in a future version.
warn: DeprecationWarning: The Parse Server option 'allowClientClassCreation' default will change to 'false' in a future version.
C:\Users\esteban\Desktop\WORK\-- LORENZO --\moralis server\v3\src\cloud\generated\evmApi.ts:34
    throw new Error(`Not supported operation ${operationName}`);
          ^
Error: Not supported operation getNFTTrades
    at getOperation (C:\Users\esteban\Desktop\WORK\-- LORENZO --\moralis server\v3\src\cloud\generated\evmApi.ts:34:11)
    at Object.<anonymous> (C:\Users\esteban\Desktop\WORK\-- LORENZO --\moralis server\v3\src\cloud\generated\evmApi.ts:269:31)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Object.require.extensions.<computed> [as .js] (C:\Users\esteban\Desktop\WORK\-- LORENZO --\moralis server\v3\node_modules\ts-node\src\index.ts:1608:43)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Users\esteban\Desktop\WORK\-- LORENZO --\moralis server\v3\src\cloud\main.ts:4:1)
error Command failed with exit code 1.

I saw there are various posts with the same problem but i wasnโ€™t able to solve it.

I tried running the gen:cloud script but it ended up with more errors :slight_smile:

So i keep looking up but if anyone has a fix, iโ€™ll take it.

Thanks.

ps : both mongoDB and redis are installed and running

The function seem to have been created to me

alright, it actually works if i use the github file.

I guess you should just update (or remove) the download link from the tutorial as it point to an outdated version.

Another error though.

if i keep the use_stream to true. I run into that :

C:\Users\esteban\Desktop\WORK\-- LORENZO --\moralis server\v4\node_modules\parse-server\lib\ParseServer.js:261
          throw err;
          ^

TypeError: Cannot read properties of undefined (reading 'body')
    at NgrokClient.request (C:\Users\esteban\Desktop\WORK\-- LORENZO --\moralis server\v4\node_modules\ngrok\src\client.js:40:26)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async connectRetry (C:\Users\esteban\Desktop\WORK\-- LORENZO --\moralis server\v4\node_modules\ngrok\index.js:29:22)
    at async Server.<anonymous> (C:\Users\esteban\Desktop\WORK\-- LORENZO --\moralis server\v4\src\index.ts:38:17)
error Command failed with exit code 7.

Is there a doc on what streams are and how to set them up, i donโ€™t think its mentionned anywhere in the tutorial

Hi @hjiul

Please check this docs for setting up streams on self host server.
https://v1docs.moralis.io/moralis-dapp/getting-started/self-hosting-moralis-server/optional-features/streams

Can you share more details on when you are seeing the error TypeError: Cannot read properties of undefined (reading 'body')?