Code Monkey home page Code Monkey logo

project_youtube_clone's Introduction

Build and Deploy a Modern YouTube Clone Application in React JS with Material UI 5

YouTube

Showcase your dev skills with practical experience and land the coding career of your dreams

๐Ÿ’ป JS Mastery Pro - https://jsmastery.pro/youtube โœ… A special YOUTUBE discount code is automatically applied!

๐Ÿ“™ Get the Ultimate Frontend & Backend Development Roadmaps, a Complete JavaScript Cheatsheet, Portfolio Tips, and more - https://www.jsmastery.pro/links

project_youtube_clone's People

Contributors

adrianhajdin avatar tidbitsjs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

project_youtube_clone's Issues

Uncaught SyntaxError: Unexpected token '<' (at constants.js?t=1675529881066:18:24)

getting this following error while importing categories from contants
error: constants.js?t=1675529881066:18 Uncaught SyntaxError: Unexpected token '<' (at constants.js?t=1675529881066:18:24)

utils folder

export const categories = [
  { name: 'New', icon: <HomeIcon /> },
  { name: 'JS Mastery', icon: <CodeIcon /> },
  { name: 'Coding', icon: <CodeIcon /> },
  { name: 'ReactJS', icon: <CodeIcon /> },
  { name: 'NextJS', icon: <CodeIcon /> },
  { name: 'Music', icon: <MusicNoteIcon /> },
  { name: 'Education', icon: <SchoolIcon /> },
  { name: 'Podcast', icon: <GraphicEqIcon /> },
  { name: 'Movie', icon: <OndemandVideoIcon /> },
  { name: 'Gaming', icon: <SportsEsportsIcon /> },
  { name: 'Live', icon: <LiveTvIcon /> },
  { name: 'Sport', icon: <FitnessCenterIcon /> },
  { name: 'Fashion', icon: <CheckroomIcon /> },
  { name: 'Beauty', icon: <FaceRetouchingNaturalIcon /> },
  { name: 'Comedy', icon: <TheaterComedyIcon /> },
  { name: 'Gym', icon: <FitnessCenterIcon /> },
  { name: 'Crypto', icon: <DeveloperModeIcon /> },
];

Uncaught runtime errors

Uncaught runtime errors:
ร—
ERROR
Cannot read properties of null (reading 'map')
TypeError: Cannot read properties of null (reading 'map')
at Videos (http://localhost:3000/static/js/bundle.js:988:22)
at renderWithHooks (http://localhost:3000/static/js/bundle.js:39676:22)
at mountIndeterminateComponent (http://localhost:3000/static/js/bundle.js:42960:17)
at beginWork (http://localhost:3000/static/js/bundle.js:44256:20)
at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:29272:18)
at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:29316:20)
at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:29373:35)
at beginWork$1 (http://localhost:3000/static/js/bundle.js:49237:11)
at performUnitOfWork (http://localhost:3000/static/js/bundle.js:48485:16)
at workLoopSync (http://localhost:3000/static/js/bundle.js:48408:9)
ERROR
Cannot read properties of null (reading 'map')
TypeError: Cannot read properties of null (reading 'map')
at Videos (http://localhost:3000/static/js/bundle.js:988:22)
at renderWithHooks (http://localhost:3000/static/js/bundle.js:39676:22)
at mountIndeterminateComponent (http://localhost:3000/static/js/bundle.js:42960:17)
at beginWork (http://localhost:3000/static/js/bundle.js:44256:20)
at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:29272:18)
at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:29316:20)
at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:29373:35)
at beginWork$1 (http://localhost:3000/static/js/bundle.js:49237:11)
at performUnitOfWork (http://localhost:3000/static/js/bundle.js:48485:16)
at workLoopSync (http://localhost:3000/static/js/bundle.js:48408:9)
ERROR
Cannot read properties of null (reading 'map')
TypeError: Cannot read properties of null (reading 'map')
at Videos (http://localhost:3000/static/js/bundle.js:988:22)
at renderWithHooks (http://localhost:3000/static/js/bundle.js:39676:22)
at mountIndeterminateComponent (http://localhost:3000/static/js/bundle.js:42960:17)
at beginWork (http://localhost:3000/static/js/bundle.js:44256:20)
at beginWork$1 (http://localhost:3000/static/js/bundle.js:49215:18)
at performUnitOfWork (http://localhost:3000/static/js/bundle.js:48485:16)
at workLoopSync (http://localhost:3000/static/js/bundle.js:48408:9)
at renderRootSync (http://localhost:3000/static/js/bundle.js:48381:11)
at recoverFromConcurrentError (http://localhost:3000/static/js/bundle.js:47873:24)
at performConcurrentWorkOnRoot (http://localhost:3000/static/js/bundle.js:47786:26)

Cannot read properties of null reading "snippet" in VideoDetail Componet

import { useState, useEffect } from "react";
import { Link, useParams } from "react-router-dom";
import ReactPlayer from "react-player";
import { Box, Typography, Stack } from "@mui/material";
import { CheckCircle } from "@mui/icons-material";

import { Videos } from "./";
import { fetchFromAPI } from "../utils/FetchFromAPI";

const VideoDetail = () => {
const [videoDetail, setVideoDetail] = useState(null);
console.log(videoDetail);

const { id } = useParams;

useEffect(() => {
fetchFromAPI(videos?part=snippet,statistics&id=${id}).then((data) =>
setVideoDetail(data.items[0])
);
}, [id]);

// if (!videoDetail?.snippet) return "Loading...";

// const {
// snippet: { title },
// } = videoDetail;
return (

<Stack direction={{ xs: "column", md: "row" }}>

<Box sx={{ width: "100%", position: "sticky", top: "86px" }}>
<ReactPlayer
url={https://www.youtube.com/watch?v=${id}}
className="react-player"
controls
/>

{videoDetail.snippet.title}





);
};

export default VideoDetail;

Empty divs between videos

code

This is the code
`import React from "react";
import { Stack, Box } from "@mui/material";

import { ChannelCard, VideoCard } from "./";

const Videos = ({ videos, direction }) => {
if (!videos?.length) return "Loading...";

return (
<Stack
direction={direction || "row"}
flexWrap="wrap"
justifyContent="start"
alignItems="start"
gap={3}
>
{videos.map((item, idx) => (

{item?.id?.videoId && }
{item?.id?.channelId && }

))}

);
};

export default Videos;`

Videos Not Returning On the Channel Card

None of my videos are showing up when i click on any video, nor when i click on the JS Mastery channel card. The console reads history.ts:487 No routes matched location "/channel/UCmXmlB4-HJytD7wek0Uo97A

Same video for every channel

The page is loading same video for every channel. New video , js mastery and every other channel has the same video. The title is changed but the videos are same.

Error with the video components

Can't get the data returned from the response to display on the video card components. Only demo data (demoThumbnailUrl, demoVideoUrl, demoVideoTitle, demoChannelUrl, demoChannelTitle) are displayed on each card without any issues.

Responsive Typography error while rendering the channel title in VideoDetail.jsx page

Specifying Variants in Typography tag of channel title for responsive size gives an error

the following code

<Typography variant={{ sm: "subtitle1", md: 'h6' }} color="#fff" >{channelTitle} </Typography>

will give an error of invalid prop variant passed

Screenshot 2022-08-30 215046

And also the channel title is rendered as a plain text

This can be solved by passing the typography inside the sx parameter as

<Typography sx={{typography: { sm: 'subtitle1', md: 'h6' }}} color='#fff'> {channelTitle}</Typography>

Compiled with warnings causes by `index.css`

It seems that we should modify the line: 55 in index.css

justify-content: start;

to

justify-content: flex-start;

or it would cause a compile warning

WARNING in ./src/index.css (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./src/index.css)
Module Warning (from ./node_modules/postcss-loader/dist/cjs.js):
Warning

(55:3) autoprefixer: start value has mixed support, consider using flex-start instead

While the program still runs finely! Thanks for JSM!

Using vite instead of CRA

If someone is using vite instead of CRA like I did, vite has some different way to set up environment variables so do look into it because it can generate unwanted errors.

Would suggest to use a config.js file for Rapid api key instead of using env variables to avoid those errors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.