Web3 Netflix Helping Each Other

Hi, I’m having some issues getting started.
When I enter “yarn start” in the terminal on VSC, I receive the message below…

yarn start
yarn : The term 'yarn' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.   
At line:1 char:1
+ yarn start
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (yarn:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I get a similar error message when trying to type “git clone [insert url]” (I imported the actual file to get past this part).

Any suggestions how how to fix my Visual Studio Code?

need to install yarn

run the below command to install yarn globally.

npm install -g yarn

and for git

npm install -g git

Hi there, I’m unable to view the uploaded secret video at the end. Everything else seems to work except for this.

The error I get is…
Please wait… We are checking your browser… moralis.mypinata.cloud
This web property is not accessible via this address.

Also…

when I run yarn build, and host the build file on my server, it’s missing all of the tabs, and the modals are frozen when I open them.

Please svg can it change to your own name difference from Netflix. Please help me with svg write up

You can convert an image to SVG or create your own.

Are you still having issues?

cannot seem to access the cloud

my code:

import React from ‘react’;
import { Link } from “react-router-dom”;
import { useEffect } from ‘react’;
import “./Home.css”;
import { Logo } from ‘…/images/Netflix’;
import { ConnectButton, Icon, TabList, Tab, Button, Modal, useNotification } from “web3uikit”;
import { movies } from ‘…/helpers/library’;
import { useState } from ‘react’;
import { useMoralis } from ‘react-moralis’;

const Home = () => {

const { isAuthenticated, Moralis, account } = useMoralis();
const [visible, setVisible] = useState(false);
const [selectedFilm, setSelectedFilm] = useState();
const [myMovies, setMyMovies] = useState();
const dispatch = useNotification();

useEffect(() => {
async function fetchMyList() {

  try {
    const theList = await Moralis.Cloud.run("getMyList", { addrs: account });

    const filterdA = movies.filter(function (e) {
      return theList.indexOf(e.Name) > -1;
    });

    setMyMovies(filterdA);
    
  } catch (error) {
    console.error(error)
  }
}
fetchMyList();

}, [account]);

const handleNewNotification = () => {
dispatch({
type: “error”,
message: “Please Connect Your Wallet”,
title: “Not Authenticated”,
position: “bottomR”

})

}

my cloud function script is withing the code, how does it connect?

did you save your cloud code successfully through cli?

How do you do that?

Moralis.Cloud.define(“updateMyList”, async (request) => {
const addrs = request.params.addrs;
const newFav = request.params.newFav;

const user = Moralis.Object.extend("_User");
const query = new Moralis.Query(user);
query.equalTo(“ethAddress”, addrs);

const data = await query.first({ useMasterKey: true });

if (data.attributes.myList) {
const { myList } = data.attributes;
myList.push(newFav);
data.set(“myList”, myList);
} else {
data.set(“myList”, [newFav]);
}

await data.save(null, { useMasterKey: true });
});

Moralis.Cloud.define(“getMyList”, async (request) => {
console.log(“running”);
const addrs = request.params.addrs;
const user = Moralis.Object.extend("_User");
const query = new Moralis.Query(user);
query.equalTo(“ethAddress”, addrs);

const data = await query.first({ useMasterKey: true });

if (data.attributes.myList) {
return data.attributes.myList;
} else {
return [];
}
});

this was already there in the code file, outside src folder cloudcode.js

This code needs to be saved into your moralis sever.

Check this IDE setup for uploading cloud function to the server.
https://v1docs.moralis.io/moralis-dapp/cloud-code/cloud-functions#ide-setup

and you can find your secrets required for the setup under your moralis server settings.
image

[REMOVED SCREENSHOT DUE TO API KEY/SECRET SHOWN]

got this after i ran that command. Not sure how to proceed after this

now try the cloud function in your app. Once the code is saved, you will be able to call the cloud function.


still getting these errors

import React from ‘react’;
import { Link } from “react-router-dom”;
import { useEffect } from ‘react’;
import “./Home.css”;
import { Logo } from ‘…/images/Netflix’;
import { ConnectButton, Icon, TabList, Tab, Button, Modal, useNotification } from “web3uikit”;
import { movies } from ‘…/helpers/library’;
import { useState } from ‘react’;
import { useMoralis } from ‘react-moralis’;

const Home = () => {

const { isAuthenticated, Moralis, account } = useMoralis();
const [visible, setVisible] = useState(false);
const [selectedFilm, setSelectedFilm] = useState();
const [myMovies, setMyMovies] = useState();
const dispatch = useNotification();

useEffect(() => {
async function fetchMyList() {

  try {
    const theList = await Moralis.Cloud.run("getMyList", { addrs: account });

    const filterdA = movies.filter(function (e) {
      return theList.indexOf(e.Name) > -1;
    });

    setMyMovies(filterdA);
    
  } catch (error) {
    console.error(error)
  }
}
fetchMyList();

}, [account]);

const handleNewNotification = () => {
dispatch({
type: “error”,
message: “Please Connect Your Wallet”,
title: “Not Authenticated”,
position: “bottomR”

})

}

these errors are related to a different part of the code.

To fix the second error, make sure you have added the appId and serverUrl in the MoralisProvider to start the server.

You can fix the first error by adding unique key values to the image component which is under Home.
image

i have done that in the index.js file. But doesnt seem to be recognizing it

Your server (qdogsfooe7zj) still doesn’t have this getMyList cloud function saved so that’s why calling it won’t work.

You need to specify a folder (either a full path, or relative path to where you run the command) with moralis-admin-cli watch-cloud-folder ..., not a file (cloudcode.js).

You can check your existing cloud code from the Cloud Functions page in server settings (from Moralis admin panel) - refresh the page after you upload any changes.