inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

따라하며 배우는 노드, 리액트 시리즈 - 유튜브 사이트 만들기

비디오 업로드 FORM 만들기 (1)

비디오 업로드 form 만들기 (1)에서 질문 있습니다

401

훈훈한 바다사자

작성한 질문수 0

1

VideoUploadPage 만드니 아래 에러가 뜹니다.

×

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of `VideoUploadPage`.

제 코드입니다.

import React from 'react';
import {Typography, Button, Form, message, Input, Icon} from 'antd';
import Dropzone from 'react-dropzone';

const {Title}=Typography;
const {Textarea}=Input;

function VideoUploadPage() {
    return (
        <div style={{maxWidth:'700px', margin:'2rem auto'}}>
            <div style={{textAlign:'center', marginbottom:'2rem'}}>
                <Title level={2}>Upload Video</Title>
            </div>

            <Form>
                <div style={{display:'flex', justifyContent:'space-between'}}>
                    {/* Drop zone */
                    {/* Thumbnail */}
                        <div>
                            <img alt=""></img>
                        </div>
                </div>

            <br></br>
            <br></br>
            <label>Title</label>
            <Input></Input>

            <br></br>
            <br></br>
            <label>Description</label>
            <Textarea >

            </Textarea>
            <br></br>
            <br></br>

            <select >
                   <option ></option> 
            </select>
                <br /><br />

            <select >
                <option ></option> 
            </select>
                <br /><br />

                <Button type="primary" size="large" >
                    Submit
                </Button>
            </Form>

        </div>
    )
}

export default VideoUploadPage

App.js의 일부입니다.

<Switch>
          <Route exact path="/" component={Auth(LandingPage, null)} />
          <Route exact path="/login" component={Auth(LoginPage, false)} />
          <Route exact path="/register" component={Auth(RegisterPage, false)} />
          <Route exact path="/video/upload" component={Auth(VideoUploadPage, true)} />
        </Switch>

뭐가 문제인 걸까요?

mongodb react nodejs redux

답변 3

1

gooood2166

저도 위와 같은 문제였는데요,

역시나 오타였네요 ㅠㅠ

<Textarea> 가 아니고 <TextArea> 입니다!

0

훈훈한 바다사자

에러 위치는 제가 건드리지 않은 부분이 나옵니다.

첫번째에서 지목한 index 파일 코드는 아래와 같습니다.

import { combineReducers } from 'redux';
import user from './user_reducer';

const rootReducer = combineReducers({
    user,
});

export default rootReducer;

0

John Ahn

문제가 없어 보이는데 ... 혹시 몇번째줄에서 에러났는지는 안나오나요 ?

npm i하면 바로, 라이브러리 오류없이 받아지고, 구동되는 소스는 없나요?

0

52

1

ERROR in ./node_modules/antd/es/version/index.js 2:15-22

0

221

1

자료 없음

0

322

1

이미지 깨짐

0

336

1

npm run dev 동작 에러

0

304

1

npm run dev 동작 에러

0

295

1

npm run dev 동작에러납니다...

0

661

1

npm run dev 실행 오류

0

653

1

비디오 업로드, 로그인, 회원가입 504 error

0

1056

1

시작부터 오류생기시는 분들 해결법입니다.

1

467

1

오류 해결 공유

0

459

1

npm install 에러 질문드립니다.

0

1121

2

아예 몽고DB에 연결한다고만 하고 연결이 안되고 있습니다.

0

550

1

해당 오류 해결 방법 좀 알려주세요 ㅠㅠ

0

516

1

로컬스토리지에 대한 질문입니다!!

0

515

0

video가 안 나타나는 문제

0

894

1

ffmpeg 설치 후 cannot read property 'format' of undefined 500 에러 해결

0

470

0

typeError or 콘솔 500 뜨는분..

0

336

0

npm run dev 관련 오류

0

578

1

답글이 달리지않고 디비에도 저장되지않으며 새로고침이 됩니다.

0

246

0

useState 자동 생성

0

347

1

TypeError: Cannot read properties of undefined (reading 'format')

0

1246

2

userData undefined / state에 user.userData가 없습니다.

0

248

0

antd Input background color 변경

0

242

0