I am trying to migrate my project to a self-hosted Moralis server on Heroku. I am following the official guideline document, as well as posts in this forum, ex. noviulian/parse-server-migration topic. There seems to be a problem with the ngrok versioning in package.json though. In the official/noviulian repository ngrok dependency is set to “^4.3.3”. I can build the project and generate build/cloud/main.js module, but can not run the server:
“error_code":103,“status_code”:502,“msg”:"failed to start tunnel”.
In order to run the server successfully I need to update the ngrok package to the latest one, 5.0.0-beta.2. After that I can run the server on my local machine. All good. However, once I push my repository to Heroku I get the following error:
Error: Cannot find module */app/build/cloud/main.js’
Apparently, ngrok version 5.0.0-beta.2 can’t build the required cloud module. I can reproduce this error on my local machine too.
Does anyone have any idea on how to solve this problem. Any help would be much appreciated.