Hi,
@jeremy (author of the video / code (?) )
Well done! ButâŚ
I cloned the sources of the video âI Cloned ZERION in 20 minâ via the zip of all projects: https://github.com/MoralisWeb3/demo-apps/archive/refs/heads/main.zip
Btw I got an empty react project via:
npx create-react-app moralis-zerion-clone
So that does not work for me.
After unzipping and in the moralis-zerion-clone map I succeded with:
npm install moralis react-moralis @material-ui/core @material-ui/icons
npm install
npm audit fix
copy .env-example .env
I updated contents of the .env file with my moralis server Application-ID and serverUrl
Motralis Testnet server: https://yjase4iuvprd.moralis.io:2053/server (vs: 0.0.227)
Set to : Ropsten ETH / Amsterdam
And I copied the contents of the src/cloud-functions.js to the Moralis server âcloud functionsâ screen and save-d it. => error in Moralis server dashboard log:
TypeError: Cannot read property 'define' of undefined
at eval (eval at customUserPlugin (/moralis-server/cloud/main.js:8:21), <anonymous>:1:32)
at customUserPlugin (/moralis-server/cloud/main.js:8:21)
at /moralis-server/lib/cloud-code/plugins/index.js:62:15
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Object.initialize (/moralis-server/lib/cloud-code/plugins/index.js:51:3)
CLOUD FUNCTION ERROR PLEASE CHECK YOUR CLOUD FUNCTION CODE
with the warning sign:
After removing the first line in the âCloud functionsâ:
const Moralis = {}; // just to hide IDE errors
this was solved and via âyarn startâ the app worked !