커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
AboutPage.js 의 오류
[왕초보] 나만의 수익성 앱, 앱개발 종합반 v5
4주차
북마크
안*덕
댓글
15
추천
0
조회수
17
조회수
17
답변 완료

AboutPage.js 의 코드를 만지다가 오류가 떴습니다.

뭘 만졌는지 찾을 수가 없습니다.


import React,{useEffect} from 'react'

import {View,Text,StyleSheet,Image, TouchableOpacity} from 'react-native'

import { StatusBar } from 'expo-status-bar';


export default function AboutPage({navigation,route}){

    const aboutImage = "https://storage.googleapis.com/sparta-image.appspot.com/lecture/about.png"

   

    useEffect(()=>{

        navigation.setOptions({

            title:"소개 페이지",

            headerStyle: {

                backgroundColor: '#1F266A',

                shadowColor: "#1F266A",

            },

            headerTintColor: "#fff",

        })

    },[])

    return (

        <View style={styles.container}>

             <StatusBar style="light" />

            <Text style={styles.title}>HI! 스파르타코딩 앱개발 반에 오신것을 환영합니다</Text>

       

           

            <View style={styles.textContainer}>

                <Image style={styles.aboutImage} source={{uri:aboutImage}} resizeMode={"cover"}/>

                <Text style={styles.desc01}>많은 내용을 간결하게 담아내려 노력했습니다!</Text>

                <Text style={styles.desc02}>꼭 완주 하셔서 꼭 여러분것으로 만들어가시길 바랍니다</Text>

                <TouchableOpacity style={styles.button}>

                    <Text style={styles.buttonText}>여러분의 인스타계정</Text>

                </TouchableOpacity>

            </View>

        </View>)

}


const styles = StyleSheet.create({

    container: {

        flex:1,

        backgroundColor:"#1F266A",

        alignItems:"center"

     

    },

    title: {

        fontSize:30,

        fontWeight:"700",

        color:"#fff",

        paddingLeft:30,

        paddingTop:20,

        paddingRight:30

    },

    textContainer: {

        width:300,

        height:500,

        backgroundColor:"#fff",

        marginTop:50,

        borderRadius:30,

        justifyContent:"center",

        alignItems:"center"

    },

    aboutImage:{

        width:150,

        height:150,

        borderRadius:30

    },

    desc01: {

        textAlign:"center",

        fontSize:20,

        fontWeight:"700",

        paddingLeft:22,

        paddingRight:22


    },

    desc02: {

        textAlign:"center",

        fontSize:15,

        fontWeight:"700",

        padding:22

    },

    button:{

        backgroundColor:"orange",

        padding:20,

        borderRadius:15

    },

    buttonText: {

        color:"#fff",

        fontSize:15,

        fontWeight:"700"

    }

})




위의 내용이 현재 AboutPage.js 코드입니다.

아래 내용은 에러에 대한 터미널 내용입니다.



iOS Bundling failed 102ms

Unable to resolve module @react-navigation/stack from C:\Users\loves\Desktop\sparta-study\sparta-myhoneytip-ahn\navigation\StackNavigator.js: @react-navigation/stack could not be found within the project or in these directories:  

 node_modules

 ..\node_modules

 1 | import React from 'react';

 2 | //설치한 스택 네비게이션 라이브러리를 가

져옵니다

> 3 | import { createStackNavigator } from '@react-navigation/stack';

  |                    ^ 

 4 |

 5 | //페이지로 만든 컴포넌트들을 불러옵니다 

 6 | import DetailPage from '../pages/DetailPage';

취소
 공유
취소
댓글 0
댓글 알림
나의얼굴