묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core
inflearn_actual git 레파지토리는 없나요?
안녕하세요.열심히 강의 따라가고 있었는데, 실수로 작업하던 소스파일을 삭제했습니다. 복구할 방법이 없어서 그러는데 혹시 git 리파지토리 소스나, 아니면 교육용 백업본이라도 있으면 주실 수 있을까요?
-
해결됨[리뉴얼] 맛집 지도앱 만들기 (React Native & NestJS)
[4-0] GoogleMap 연동하기 진행 중 구글맵에 오류가 발생 했습니다.
안녕하세요 강사님. 강의 잘 듣고 있습니다. :)강의 진행 중 구글맵을 띄우는 과정에서 ERROR react-native-maps: AirGoogleMaps dir must be added to your xCode project to support GoogleMaps on iOS. 라는 오류가 발생하는데요, 이 때문에 구글맵이 보이지 않아서 진행이 어려운 상태 입니다. 앞서 해당 강의에서 8분 가량 설명 해주신 부분은 모두 진행 하였는데요, 어떻게 하면 구글 맵을 띄울 수 있을까요?ㅜㅜ
-
해결됨[리뉴얼] 맛집 지도앱 만들기 (React Native & NestJS)
로그인 api 요청 이후 getAccessToken ( /auth/refresh ) api 401 error
안녕하세여 강사님 강의 잘 듣고 있습니다.다름이 아니라 회원가입 및 로그인 api 요청 성공시 onSuccess 함수 로직에 있는queryClient.refetchQueries({ queryKey: [queryKeys.AUTH, queryKeys.GET_ACCESS_TOKEN], });이 코드로 getAccessToken ( /auth/refresh ) api 를 요청하고 있습니다. 여기서 문제는 getAccessToken 요청시 401 error 가 발생하고 있습니다. DB 에 회원가입으로 생성된 유저 데이터는 잘 생성된 상태이고 오타는 없어보입니다. ㅠㅠ 도와주세여 아래 이미지는 log 이미지입니다.
-
미해결[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core
NestJS, 섹션35. 모듈 네스팅. Paginate Comments API 만들기 강의 잘림
안녕하세요.강의: NestJS REST API 백엔드 완전 정복섹션: 35 모듈 네스팅동영상: Paginate Comments API 만들기위에 적은 강의 동영상의 끝부분이, 의도치 않게 잘린 것 같습니다. 마지막인 5:56 시간에서, 말씀하는 도중에 강의가 끝나버립니다. 확인해 주시면 감사하겠습니다.
-
해결됨[리뉴얼] 맛집 지도앱 만들기 (React Native & NestJS)
colors[theme]을 못읽는 이유
import React, {ReactNode} from 'react'; import { Pressable, StyleSheet, Text, PressableProps, Dimensions, View, StyleProp, ViewStyle, TextStyle, } from 'react-native'; import {colors} from '../../constants'; import useThemeStore from '@/store/useThemeStore'; import {ThemeMode} from '@/types/common'; interface CustomButtonProps extends PressableProps { label: string; variant?: 'filled' | 'outlined'; size?: 'large' | 'medium'; inValid?: boolean; style?: StyleProp<ViewStyle>; textStyle?: StyleProp<TextStyle>; icon?: ReactNode; } const deviceHeight = Dimensions.get('screen').height; function CustomButton({ label, variant = 'filled', size = 'large', inValid = false, style = null, textStyle = null, icon = null, ...props }: CustomButtonProps) { const {theme} = useThemeStore(); const styles = styling(theme); // 여기서는 제대로 출력이 됩니다. 값이 제대로 읽힙니다. console.log(colors[theme].PINK_700); return ( <Pressable disabled={inValid} style={({pressed}) => [ styles.container, pressed ? styles[`${variant}Pressed`] : styles[variant], inValid && styles.inValid, style, ]} {...props}> <View style={styles[size]}> {icon} <Text style={[styles.text, styles[`${variant}Text`], textStyle]}> {label} </Text> </View> </Pressable> ); } const styling = (theme: ThemeMode) => StyleSheet.create({ container: { borderRadius: 3, justifyContent: 'center', flexDirection: 'row', }, inValid: { opacity: 0.5, }, filled: { backgroundColor: colors[theme].PINK_700, }, outlined: { borderColor: colors[theme].PINK_700, borderWidth: 1, }, filledPressed: { backgroundColor: colors[theme].PINK_500, }, outlinedPressed: { borderColor: colors[theme].PINK_700, borderWidth: 1, opacity: 0.5, }, large: { width: '100%', paddingVertical: deviceHeight > 700 ? 15 : 10, alignItems: 'center', justifyContent: 'center', flexDirection: 'row', gap: 5, }, medium: { width: '50%', paddingVertical: deviceHeight > 700 ? 12 : 8, alignItems: 'center', justifyContent: 'center', flexDirection: 'row', gap: 5, }, text: { fontSize: 16, fontWeight: '700', }, filledText: { color: colors[theme].WHITE, }, outlinedText: { color: colors[theme].PINK_700, }, }); export default CustomButton; console.log(colors[theme].PINK_700); 이렇게 출력할 경우, 제대로 아래와 같이 출력이 됩니다만 스타일은 제대로 읽어오지 않습니다. 이 부분에 대해서 알고 싶습니다. BUNDLE ./index.js LOG Running "MatzipApp" with {"rootTag":171,"initialProps":{"concurrentRoot":false}} LOG light LOG #C63B64 LOG #C63B64 LOG #C63B64 ERROR TypeError: Cannot read property 'PINK_700' of undefined This error is located at: in CustomButton (created by ErrorBoundary) in RCTView (created by View) in View (created by ErrorBoundary) in ErrorBoundary (created by RetryErrorBoundary) in RetryErrorBoundary (created by RootNavigator) in RootNavigator (created by App) in EnsureSingleNavigator in BaseNavigationContainer in ThemeProvider in NavigationContainerInner (created by App) in _QueryClientProvider (created by App) in App in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer in MatzipApp(RootComponent), js engine: hermes ERROR TypeError: Cannot read property 'WHITE' of undefined This error is located at: in RetryErrorBoundary (created by RootNavigator) in RootNavigator (created by App) in EnsureSingleNavigator in BaseNavigationContainer in ThemeProvider in NavigationContainerInner (created by App) in _QueryClientProvider (created by App) in App in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer in MatzipApp(RootComponent), js engine: hermes ERROR TypeError: Cannot read property 'WHITE' of undefined This error is located at: in RetryErrorBoundary (created by RootNavigator) in RootNavigator (created by App) in EnsureSingleNavigator in BaseNavigationContainer in ThemeProvider in NavigationContainerInner (created by App) in _QueryClientProvider (created by App) in App in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer in MatzipApp(RootComponent), js engine: hermes ERROR TypeError: Cannot read property 'WHITE' of undefined https://github.com/dydals3440/MatZip좀더 정확히 판단을 위하여 제가 커밋한 레포 남겨드립니다!!!
-
미해결[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core
Transform 적용시 슬래시가 //개로 표기 되는데 괜찮은걸까요?
응답에서 슬래시가 // 두개로 표기되고 슬래시// 두개가 포함된 image 값을 그대로 복사해서 웹에서 테스트했을때 이미지는 정상적으로 확인됩니다. //두개 표기되는게 문제있는건 아닌걸까요?
-
해결됨[리뉴얼] 맛집 지도앱 만들기 (React Native & NestJS)
해결했습니다!
해결했습니다!
-
해결됨[리뉴얼] 맛집 지도앱 만들기 (React Native & NestJS)
useEffect 의존성 배열 문제
해당 강좌 그대로 진행하다가, 의존성 배열 문제로 인해 무한 렌더링이 발생했습니다.강사님의 깃허브 코드를 바탕으로, 강좌와 다르게 전역 상태로 관리를 진행하여 해결을 하긴 했습니다.어떠한 문제로 인해, 무한 렌더링이 발생되고, 이럴 경우에 어떤 방식으로 접근해서 해결하는지에 대한 접근 방식에 대해 알고 싶습니다!!!web과 다르게 RN은 디버깅하기가 생각보다 쉽지않네요... ㅠㅠ
-
해결됨[리뉴얼] 맛집 지도앱 만들기 (React Native & NestJS)
최근 DatePicker의 textColor prop이 제거되었고, theme 사용이 권장됩니다.
버그나 에러 질문은 아니구요! react native date picker 패키지를 이용해 DatePicker를 구현하는 단계있는데요,textColor prop을 타이핑할 때 자동완성이 안되어 찾아보니 올해 3월 23일에 릴리즈한 5.0.0에서 제거되었네요. https://github.com/henninghall/react-native-date-picker/releases/tag/5.0.0대신 theme을 사용하라고 하는데, 기본값인 auto를 쓰거나 혹은 light로 설정하면 강의와 같이 text가 검은색으로 잘 나옵니다.강의 들으시다가 저처럼 띠용하시는 분 계실까봐 참고차 남겨놓습니다! 좋은 강의 감사드립니다!
-
미해결[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core
강의 영상이 나오지 않습니다
강의가 음성만 재생이 되고 영상이 재생되지 않네요다른 강의들은 영상과 음성 모두 재생되는데 이 강의만 재생이 되지 않아요
-
미해결[리뉴얼] 맛집 지도앱 만들기 (React Native & NestJS)
카카오 주소 검색 기능 401 에러
LOG a {"latitude": 37.550165, "longitude": 127.12752} LOG [AxiosError: Request failed with status code 401강의영상 잘 따라하고, REST API KEY까지 제대로 입력했는데, 위와 같은 에러가 발생합니다.import React from 'react'; import {StyleSheet, TextInput, TextInputProps, View} from 'react-native'; import Ionicons from 'react-native-vector-icons/Ionicons'; import {colors} from '@/constants'; interface SearchInputProps extends TextInputProps { onSubmit: () => void; } function SearchInput({onSubmit, ...props}: SearchInputProps) { return ( <View style={styles.container}> <TextInput style={styles.input} autoCapitalize="none" placeholderTextColor={colors.GRAY_500} returnKeyType="search" onSubmitEditing={onSubmit} clearButtonMode="while-editing" {...props} /> <Ionicons name={'search'} color={colors.GRAY_700} size={20} onPress={onSubmit} /> </View> ); } const styles = StyleSheet.create({ container: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', borderWidth: 1, borderColor: colors.GRAY_200, paddingVertical: 8, paddingHorizontal: 10, borderRadius: 5, }, input: { flex: 1, fontSize: 16, paddingVertical: 0, paddingLeft: 0, color: colors.BLACK, }, }); export default SearchInput; import axios from 'axios'; import {useEffect, useState} from 'react'; import Config from 'react-native-config'; import {LatLng} from 'react-native-maps'; type Meta = { total_count: number; pageable_count: number; is_end: boolean; same_name: { region: string[]; keyword: string; selected_region: string; }; }; export type RegionInfo = { address_name: string; category_group_code: string; category_group_name: string; category_name: string; distance: string; id: string; phone: string; place_name: string; place_url: string; road_address_name: string; x: string; y: string; }; type RegionResponse = { meta: Meta; documents: RegionInfo[]; }; function useSearchLocation(keyword: string, location: LatLng) { const [regionInfo, setRegionInfo] = useState<RegionInfo[]>([]); const [pageParam, setPageParam] = useState(1); console.log(keyword, location); useEffect(() => { (async () => { try { const {data} = await axios.get( `https://dapi.kakao.com/v2/local/search/address.json?query=${keyword}&y=${location.latitude}&x=${location.longitude}&page=${pageParam}`, { headers: { Authorization: `KakaoAK ${Config.KAKAO_REST_API_KEY}`, }, }, ); console.log('data', data); } catch (error) { console.log(error); } })(); }, [keyword, location]); return {regionInfo}; } export default useSearchLocation; GOOGLE_API_KEY=키내용들 KAKAO_REST_API_KEY=키내용들 어떤 부분이 잘못되어서 401 에러가 발생하는지 알고싶습니다.
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
레퍼지토리 주입 기준이 궁금합니다.
안녕하세요.개인프로젝트하면서 필요한부분들 다시 보는중인데 궁금한점이 생겨서 질문드립니다. 이전 1:1 관계등록 API 강의에서는 상품판매위치 레퍼지토리를 상품의 service에서 주입받지 않고 따로 service를 만들어서 거기서 주입받고 해당 로직을 처리했었습니다.검증로직을 통일시키기 위해서라고 하셨는데, 이번 강의에서는 포인트 레퍼지토리가 주입되어있는 상태에서 추가적으로 유저 레퍼지토리를 주입받아서 유저정보를 가져오시는데, 차이나 기준이 궁금합니다. 더불어 나중 강의인 트랜젝션에서도 현재 주입받은 유저 레퍼지토리를 기준으로 진행되는데, 만약 레퍼지토리를 service별로 분리해야된다면, 쿼리러너를 해당 service로 던졌다가 받던지, 아니면 해당 service에서 xxRepository.create()로 만든걸 받던지 하는 식으로 해야할듯 싶은데 그런 불편함보다는 그냥 한곳에서 처리하는게 낫지 않나 하는 생각이 들기도합니다. 그래서 트랜젝션 사용할때의 레퍼지토리 기준과 만약 service별로 나뉘게 된다면 사용 방법이 궁금합니다. 마지막으로 제가 트렌젝션을 써봤는데, 다른 테이블의 레퍼지토리를 한 개의 service에서 레퍼지토리 주입은 안받고, 모듈에서만 import의 TypeOrmModule.forFreature([]) 부분에 넣어줘도 잘 동작하던데 이렇게 써도 되는게 맞는지 궁금합니다. 혹시 몰라 아래에 해당 코드 첨부해봅니다.// restAPI입니다. // auth.module.ts import { Module } from '@nestjs/common'; import { AuthController } from './auth.controller'; import { AuthService } from './auth.service'; import { UsersService } from '../02.Users/users.service'; import { TypeOrmModule } from '@nestjs/typeorm'; import { User } from '../02.Users/entities/users.entity'; import { Auth } from './entities/auth.entity'; @Module({ imports: [TypeOrmModule.forFeature([Auth, User])], controllers: [AuthController], providers: [AuthService], }) export class AuthModule {} // auth.service.ts import { BadRequestException, ConflictException, Injectable, InternalServerErrorException, } from '@nestjs/common'; import { UsersService } from '../02.Users/users.service'; import { InjectRepository } from '@nestjs/typeorm'; import { Auth } from './entities/auth.entity'; import { DataSource, Repository } from 'typeorm'; import { ConfigService } from '@nestjs/config'; import * as bcrypt from 'bcrypt'; import { IAuthServiceCheckInput, IAuthServiceCreate, IAuthServiceLogin, } from './interfaces/auth-service.interface'; import { User } from '../02.Users/entities/users.entity'; @Injectable() export class AuthService { constructor( @InjectRepository(Auth) private readonly authRepository: Repository<Auth>, private readonly configService: ConfigService, private readonly dataSource: DataSource, ) {} // 생략 async create({ createUserInput }: IAuthServiceCreate): Promise<User> { const { user_id, user_pw, id, ...userData } = createUserInput; const { user_email, user_nick } = userData; if (!id) { const checkUserInput = { user_id, user_email, user_nick }; await this.checkUser({ checkUserInput }); } const queryRunner = this.dataSource.createQueryRunner(); await queryRunner.connect(); await queryRunner.startTransaction(); try { const user = await queryRunner.manager.save( User, id ? { id: id, ...userData } : userData, ); const hashedPw = await this.hashPw({ user_pw }); await queryRunner.manager.save(Auth, { user_id, user_pw: hashedPw, user, }); await queryRunner.commitTransaction(); return user; } catch (error) { await queryRunner.rollbackTransaction(); throw new InternalServerErrorException('회원 가입 실패(DB)'); } finally { queryRunner.release(); } } // 생략
-
미해결[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core
Bearer라는 단어로 작성하는 이유가 있나요?
항상 좋은 강의 감사합니다.예전에 프론트 개발 할 때도 궁금했던 부분인데Bearer 를 굳이 작성하는 이유나 혹은 작성하게 된 관습의 기원이 궁금합니다.
-
해결됨[리뉴얼] 맛집 지도앱 만들기 (React Native & NestJS)
[해결 완료] yarn start 안드로이드 실행 오류
AILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:installDebug'. > com.android.builder.testing.api.DeviceException: No connected devices! 실패: 예외로 인해 빌드가 실패했습니다. * 무엇이 잘못되었는지: ':app:installDebug' 작업 실행에 실패했습니다. > com.android.builder.testing.api.DeviceException: 연결된 장치가 없습니다!Android Studio 실행More Actions -> Virtual Device Manager
-
해결됨[리뉴얼] 맛집 지도앱 만들기 (React Native & NestJS)
[해결 완료] yarn start 아이폰 실행 오류
Unable to open 'package.json': Unable to read file '/package.json' (Error: Unable to resolve non-existing file '/package.json'). 'package.json'을 열 수 없습니다: '/package.json' 파일을 읽을 수 없습니다(오류: 존재하지 않는 파일 '/package.json'을 확인할 수 없습니다). error iOS devices or simulators not detected. Install simulators via Xcode or connect a physical iOS device 오류 iOS 장치 또는 시뮬레이터가 감지되지 않습니다. Xcode를 통해 시뮬레이터를 설치하거나 실제 iOS 장치를 연결하세요.Xcode 실행 -> Settings -> Platforms[GET] iOS 17.4분명히....이전에...GET 했었는데...요상함...
-
미해결[리뉴얼] 맛집 지도앱 만들기 (React Native & NestJS)
sudo gem install cocoapods 오류 [해결 방법]
[오류]ERROR: Error installing cocoapods: The last version of drb (>= 0) to support your Ruby & RubyGems was 2.0.6. Try installing it with gem install drb -v 2.0.6 and then running the current command again drb requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210. 오류: Cocoapod 설치 오류: Ruby 및 RubyGems를 지원하는 drb(>= 0)의 마지막 버전은 2.0.6입니다. gem install drb -v 2.0.6으로 설치한 후 현재 명령을 다시 실행해 보세요. drb에는 Ruby 버전 >= 2.7.0이 필요합니다. 현재 루비 버전은 2.6.10.210입니다. [오류]ERROR: Error installing cocoapods: The last version of activesupport (>= 5.0, < 8) to support your Ruby & RubyGems was 6.1.7.7. Try installing it with gem install activesupport -v 6.1.7.7 and then running the current command again activesupport requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210. 오류: Cocoapod 설치 오류: Ruby & RubyGems를 지원하는 마지막 activesupport 버전(>= 5.0, < 8)은 6.1.7.7입니다. gem install activesupport -v 6.1.7.7을 사용하여 설치한 후 현재 명령을 다시 실행해 보세요. activesupport에는 Ruby 버전 >= 2.7.0이 필요합니다. 현재 루비 버전은 2.6.10.210입니다.
-
해결됨[리뉴얼] 맛집 지도앱 만들기 (React Native & NestJS)
카카오 로그인 관련 Webview 질문드립니다.
안녕하세요. Webview 관련해서 다시 질문드립니다. import axios from 'axios'; import React, {useState} from 'react'; import { ActivityIndicator, Dimensions, Platform, StyleSheet, Text, View, } from 'react-native'; import {SafeAreaView} from 'react-native-safe-area-context'; import WebView, { WebViewMessageEvent, WebViewNavigation, } from 'react-native-webview'; import useAuth from '../../hooks/queries/useAuth'; import Config from 'react-native-config'; import {authNavigations, colors} from '../../constants'; import {AuthStackParamList} from '../../navigations/stack/AuthStackNavigator'; import {NativeStackScreenProps} from '@react-navigation/native-stack'; const REDIRECT_URI = `{배포된 SERVER의 REDIRECT URI}` type AuthHomeScreenProps = NativeStackScreenProps<AuthStackParamList>; function KakaoLoginScreen({navigation}: AuthHomeScreenProps) { const {kakoLoginMutation} = useAuth(); const [isLoading, setIsLoading] = useState(false); const [isChangeNavigate, setIsChangeNavigate] = useState(true); const handleOnMessage = (event: WebViewMessageEvent) => { if (event.nativeEvent.url.includes(`${REDIRECT_URI}?code=`)) { const code = event.nativeEvent.url.replace(`${REDIRECT_URI}?code=`, ''); requestToken(code); // navigation.navigate(authNavigations.MAINBOTTOMTABNAVIGATOR, {code}); navigation.navigate(authNavigations.MAINBOTTOMTABNAVIGATOR); } }; const requestToken = async (code: string) => { const response = await axios({ method: 'post', url: 'https://kauth.kakao.com/oauth/token', params: { grant_type: 'authorization_code', client_id: Config.KAKAO_REST_API_KEY, redirect_uri: REDIRECT_URI, code, }, }); console.log('response.data', response.data); kakoLoginMutation.mutate(response.data.access_token); }; // 로딩 처리 const handleNavigationChangeState = (event: WebViewNavigation) => { const isMatched = event.url.includes(`${REDIRECT_URI}?code=`); setIsLoading(isMatched); setIsChangeNavigate(event.loading); }; return ( <SafeAreaView style={styles.container}> {(isLoading || isChangeNavigate) && ( <View style={styles.kakaoLoadingContainer}> <ActivityIndicator size={'small'} color={colors.BLACK} /> </View> )} <WebView source={{ uri: `https://kauth.kakao.com/oauth/authorize?response_type=code&client_id=${Config.KAKAO_REST_API_KEY}&redirect_uri=${REDIRECT_URI}`, }} onMessage={handleOnMessage} injectedJavaScript={"window.ReactNativeWebView.postMessage('')"} onNavigationStationChange={handleNavigationChangeState} /> </SafeAreaView> ); } const styles = StyleSheet.create({ container: { flex: 1, }, kakaoLoadingContainer: { backgroundColor: colors.WHITE, height: Dimensions.get('window').height, alignItems: 'center', justifyContent: 'center', }, }); export default KakaoLoginScreen; 위와 같은 KakaologinScreen.tsx 코드에서 Webview 내의 source 부분에 RESTFULAPI_KEY 부분과 REDIRECT_URI를 넣고 강의에서처럼 카카오 로그인을 시도하였는데, 카카오 로그인 창이 뜨지 않고 계속 로딩 중인 상태입니다. 그래서 Webview 컴포넌트 source부분의 uri를 따로 때어서 웹 페이지에서 접속을 해보았는대로 아이디/비밀번호 입력창이 뜨지 않고 하얀색 공백창만 뜨는 상태입니다. 이와 같은 경우, 배보된 서버의 REDIRECT_URI의 문제인가요? 아니면 다른 부분에서 문제가 발생하는지 질문 드립니다. ❗질문 작성시 참고해주세요최대한 상세히 현재 문제(또는 에러)와 코드(또는 github)를 첨부해주셔야 그만큼 자세히 답변드릴 수 있습니다.맥/윈도우, 안드로이드/iOS, 버전 등의 개발환경도 함께 적어주시면 도움이 됩니다. 에러메세지는 일부분이 아닌 전체 상황을 올려주세요!
-
미해결[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core
relation option "nullable : false" 로 설정했는데, 테이블에 insert가 되고 있습니다.
안녕하세요 선생님~위와 같이 세팅해서user/profile로 post 요청을 보내면 500 에러가 나야하는걸로 알고 있는데,이처럼 잘 들어가 버리네요ㅜ`users` 로 get요청을 보내도 profile이 null이 들어간 상태로 조회됩니다.개발환경 버전도 올려드립니다~
-
해결됨[리뉴얼] 맛집 지도앱 만들기 (React Native & NestJS)
ios 실행 이후 ➜ explicit dependency.. 뜨고 멈추는 경우 해결책 공유합니다.
xcode 15.3node 21.1.0프로젝트를 latest로 설치하면 문제가 없는데, 강의와 일치시키려고 0.72.6으로 설치하면 https://github.com/facebook/react-native/issues/39743위와 같은 에러가 발생했습니다.---xcode에서 직접 빌드 시키니, flipperKit에서 에러가 발생했습니다.---이럴 경우 해결 방법입니다.https://github.com/facebook/react-native/issues/43335저처럼 시간 쏟는 분들이 계실까봐 공유합니다.
-
미해결탄탄한 백엔드 NestJS, 기초부터 심화까지
jwt를 따로 연습하고 있는데 env를 못읽는 것 같습니다.
import { Module } from '@nestjs/common'; import { AuthController } from './auth.controller'; import { AuthService } from './auth.service'; import { ConfigModule } from '@nestjs/config'; import { PassportModule } from '@nestjs/passport'; import { JwtModule } from '@nestjs/jwt'; import { JwtStrategy } from 'src/auth/jwt/jwt.strategy'; @Module({ imports: [ ConfigModule.forRoot({ isGlobal: true, envFilePath: `.env.${process.env.NODE_ENV}`, }), PassportModule.register({ defaultStrategy: 'jwt', session: false }), JwtModule.register({ secret: process.env.JWT_SECRET, signOptions: { expiresIn: '1y' }, }), ], controllers: [AuthController], providers: [AuthService, JwtStrategy], }) export class AuthModule {}이게 auth.module.ts 파일입니다import { Injectable } from '@nestjs/common'; import { PassportStrategy } from '@nestjs/passport'; import { ExtractJwt, Strategy } from 'passport-jwt'; @Injectable() export class JwtStrategy extends PassportStrategy(Strategy) { constructor() { super({ jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(), ignoreExpiration: false, secretOrKey: process.env.JWT_SECRET, }); } async validate() {} }여기서 문제가 일어났습니다. process.env.JWT_SECRET 이 것을 읽지 못합니다.NODE_ENV="development" JWT_SECRET="secret" PORT=8000.env.development 파일도 root폴더에 잘 있습니다. 무엇이 문제인지 잘 모르겠습니다