Cannot start Moralis self-hosted server

I tried self hosting the Moralis server using the tutorials in the website ,but I get the error referenceerror: indexeddb is not defined Since I am not into the backend servers,I could not comprehend the stuff on the internet

Hi @raaghavmanivel

Can you share the screenshot of the error trace and the path of the file where you can find indexeddb?

This is the error I get

          throw err;

ReferenceError: indexedDB is not defined
    at /home/raaghavmanivel/new/parse-server-migration/node_modules/idb-keyval/dist/index.cjs:21:25
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v21.7.1
error Command failed with exit code 7.```

Hi @raaghavmanivel

As per the error message, it is directly from the parse-server node module not from the code.

May I know at which step from the tutorial you have seen this error?

It seems like you are using the latest version of node. Can you try using an older version like v18.18.2 just to check if the issue is related to the node version.

I tried with the node version as 18.I was returned with a different error

          throw err;

ReplyError: Ready check failed: NOPERM this user has no permissions to run the 'info' command or its sub-commands
    at parseError (/home/raaghavmanivel/parse-server-migration/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/home/raaghavmanivel/parse-server-migration/node_modules/redis-parser/lib/parser.js:302:14)
Emitted 'error' event on RedisClient instance at:
    at RedisClient.on_info_cmd (/home/raaghavmanivel/parse-server-migration/node_modules/redis/index.js:432:14)
    at /home/raaghavmanivel/parse-server-migration/node_modules/redis/index.js:471:14
    at Object.callbackOrEmit [as callback_or_emit] (/home/raaghavmanivel/parse-server-migration/node_modules/redis/lib/utils.js:89:9)
    at /home/raaghavmanivel/parse-server-migration/node_modules/redis/lib/individualCommands.js:157:15
    at Object.callbackOrEmit [as callback_or_emit] (/home/raaghavmanivel/parse-server-migration/node_modules/redis/lib/utils.js:89:9)
    at RedisClient.return_error (/home/raaghavmanivel/parse-server-migration/node_modules/redis/index.js:642:11)
    at JavascriptRedisParser.returnError (/home/raaghavmanivel/parse-server-migration/node_modules/redis/index.js:142:18)
    at JavascriptRedisParser.execute (/home/raaghavmanivel/parse-server-migration/node_modules/redis-parser/lib/parser.js:542:14)
    at Socket.<anonymous> (/home/raaghavmanivel/parse-server-migration/node_modules/redis/index.js:219:27)
    at Socket.emit (node:events:517:28) {
  command: 'INFO',
  code: 'NOPERM'

This is an error with permissions. Maybe you need to run the command as a sudo user. Try adding sudo before the command

Do you mean,

sudo npm run dev

That would not work right

Did you try?
When we sudo all the following commands will also run as sudo user. So it should run whatever command that is throwing NOPERM this user has no permissions error with sudo permission.

Could you tell me the specific command?

You can try the command that caused the previous error. I dont know which is that command

I tried changing the role to โ€œFull accessโ€ and the error did go away,but when i open localhost, i get

Cannot GET /

And ,after a few seconds, the port closes and I am returned with a huge error,that comes down to

body: {
    error_code: 104,
    status_code: 503,
    msg: 'ngrok is not yet ready to start tunnels',
    details: {
      err: 'a successful ngrok tunnel session has not yet been established'

Did you previously test ngrok in your machine?

If not can you try the initial setup as shown in the below docs. I think it requires some authentication before using it for the first time.

But that is never said in the moralis documentation right?

It is not a standard requirement. But it fixed the issue for some users in the past.