inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

cocoapods 문제로 에러 발생

미해결

배달앱 클론코딩 [with React Native]

cocoapods 문제로 또 에러가 떴어요 ㅠ 에러 메세지는 아래와 같아요 그거해서 cocoapods설치하고 npx ~ 로 Awesomeproject 생성했는데 아래 오류가 발생했어요 터미널 껐다 켰는데도 같아요 ㅠ --------------------- ✔ Downloading template ✔ Copying template ✔ Processing template ✔ Installing Ruby Gems ✖ Installing CocoaPods dependencies (this may take a few minutes) error Framework build type is static library [Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json Analyzing dependencies Fetching podspec for DoubleConversion from ../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec [Codegen] Found FBReactNativeSpec Fetching podspec for RCT-Folly from ../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec [Codegen] Found rncore Fetching podspec for boost from ../node_modules/react-native/third-party-podspecs/boost.podspec Fetching podspec for glog from ../node_modules/react-native/third-party-podspecs/glog.podspec Fetching podspec for hermes-engine from ../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec [Hermes] Using the release tarball from Maven Central Adding spec repo trunk with CDN https://cdn.cocoapods.org/ Downloading dependencies Installing CocoaAsyncSocket (7.6.5) Installing DoubleConversion (1.1.6) Installing FBLazyVector (0.72.4) Installing FBReactNativeSpec (0.72.4) Installing Flipper (0.182.0) Installing Flipper-Boost-iOSX (1.76.0.1.11) Installing Flipper-DoubleConversion (3.2.0.1) Installing Flipper-Fmt (7.1.7) Installing Flipper-Folly (2.6.10) Installing Flipper-Glog (0.5.0.5) Installing Flipper-PeerTalk (0.0.4) Installing FlipperKit (0.182.0) Installing OpenSSL-Universal (1.1.1100) Installing RCT-Folly (2021.07.22.00) Installing RCTRequired (0.72.4) Installing RCTTypeSafety (0.72.4) Installing React (0.72.4) Installing React-Codegen (0.72.4) Installing React-Core (0.72.4) Installing React-CoreModules (0.72.4) Installing React-NativeModulesApple (0.72.4) Installing React-RCTActionSheet (0.72.4) Installing React-RCTAnimation (0.72.4) Installing React-RCTAppDelegate (0.72.4) Installing React-RCTBlob (0.72.4) Installing React-RCTImage (0.72.4) Installing React-RCTLinking (0.72.4) Installing React-RCTNetwork (0.72.4) Installing React-RCTSettings (0.72.4) Installing React-RCTText (0.72.4) Installing React-RCTVibration (0.72.4) Installing React-callinvoker (0.72.4) Installing React-cxxreact (0.72.4) Installing React-debug (0.72.4) Installing React-hermes (0.72.4) Installing React-jsi (0.72.4) Installing React-jsiexecutor (0.72.4) Installing React-jsinspector (0.72.4) Installing React-logger (0.72.4) Installing React-perflogger (0.72.4) Installing React-rncore (0.72.4) Installing React-runtimeexecutor (0.72.4) Installing React-runtimescheduler (0.72.4) Installing React-utils (0.72.4) Installing ReactCommon (0.72.4) Installing SocketRocket (0.6.1) Installing Yoga (1.14.0) Installing YogaKit (1.18.1) Installing boost (1.76.0) Installing fmt (6.2.1) Installing glog (0.3.5) [!] /bin/bash -c set -e #!/bin/bash # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. set -e PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}" CURRENT_ARCH="${CURRENT_ARCH}" if [ -z "$CURRENT_ARCH" ] || [ "$CURRENT_ARCH" == "undefined_arch" ]; then # Xcode 10 beta sets CURRENT_ARCH to "undefined_arch", this leads to incorrect linker arg. # it's better to rely on platform name as fallback because architecture differs between simulator and device if [[ "$PLATFORM_NAME" == "simulator" ]]; then CURRENT_ARCH="x86_64" else CURRENT_ARCH="arm64" fi fi # @lint-ignore-every TXT2 Tab Literal if [ "$CURRENT_ARCH" == "arm64" ]; then cat <<\EOF >>fix_glog_0.3.5_apple_silicon.patch diff --git a/config.sub b/config.sub index 1761d8b..43fa2e8 100755 --- a/config.sub +++ b/config.sub @@ -1096,6 +1096,9 @@ case $basic_machine in basic_machine=z8k-unknown os=-sim ;; + arm64-*) + basic_machine=$(echo $basic_machine | sed 's/arm64/aarch64/') + ;; none) basic_machine=none-none os=-none EOF patch -p1 config.sub fix_glog_0.3.5_apple_silicon.patch fi export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)" export CXX="$CC" # Remove automake symlink if it exists if [ -h "test-driver" ]; then rm test-driver fi # Manually disable gflags include to fix issue https://github.com/facebook/react-native/issues/28446 sed -i.bak -e 's/\@ac_cv_have_libgflags\@/0/' src/glog/logging.h.in && rm src/glog/logging.h.in.bak sed -i.bak -e 's/HAVE_LIB_GFLAGS/HAVE_LIB_GFLAGS_DISABLED/' src/config.h.in && rm src/config.h.in.bak ./configure --host arm-apple-darwin cat << EOF >> src/config.h /* Add in so we have Apple Target Conditionals */ #ifdef APPLE #include <TargetConditionals.h> #include <Availability.h> #endif /* Special configuration for ucontext */ #undef HAVE_UCONTEXT_H #undef PC_FROM_UCONTEXT #if defined(__x86_64__) #define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip #elif defined(__i386__) #define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip #endif EOF # Prepare exported header include EXPORTED_INCLUDE_DIR="exported/glog" mkdir -p exported/glog cp -f src/glog/log_severity.h "$EXPORTED_INCLUDE_DIR/" cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/" cp -f src/glog/raw_logging.h "$EXPORTED_INCLUDE_DIR/" cp -f src/glog/stl_logging.h "$EXPORTED_INCLUDE_DIR/" cp -f src/glog/vlog_is_on.h "$EXPORTED_INCLUDE_DIR/" patching file config.sub 1 out of 1 hunks failed--saving rejects to config.sub.rej ✖ Installing CocoaPods dependencies (this may take a few minutes) error Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/environment-setup?os=macos&platform=android and follow the React Native CLI QuickStart guide for macOS and iOS. info Run CLI with --verbose flag for more details. ---------------------

  • react-native
meyou1218 댓글 1 좋아요 0 조회수 641

messaging().setBackgroundMessageHandler 핸들링 미적용

미해결

배달앱 클론코딩 [with React Native]

안녕하세요 강의 잘 듣고 있습니다. 현재 강의를 듣고 FCM을 구현하던 중 백그라운드 상태에서 push 알림을 핸들링 하고자하는데 어려움이 있어 질문 남겨요. messaging().setBackgroundMessageHandler(async remoteMessage => { const channelId = Platform.OS === 'ios' ? remoteMessage.category : remoteMessage.notification?.android?.channelId; console.log('FCM Channel ID:', channelId); if (channelId === 'example-sample') { // 해당 채널 ID가 'example-sample'인 경우 Push 알림 노출하지 않고 종료합니다. return; } }); 목표 ( 채널을 통한 알림 수신 거부 처리 ) 1. 앱서버에서 메시지 전송시 channel id값을 담아 발송. 2. 앱이 background or quick 일때 특정 channel id시에는 push 알림 비 노출 해당 메소드를 정상적으로 타긴 하지만 이미 디바이스에서는 알림이 오고 있습니다. 백그라운드 또는 종료 상태일경우 FCM 메시지를 컨트롤 할 수 없는 것일까요?

  • react-native
  • fcm
장만호 댓글 1 좋아요 0 조회수 593

Installing CocoaPods 설치가 안된다고 나옵니다

미해결

배달앱 클론코딩 [with React Native]

npx react-native@latest init AwesomeProject를 했는데 자동으로 다운이 되지 않고 sudo gem~으로 다운할려구 했는데 이것도 안되네요.. 왜이럴까요..!?

  • react-native
meyou1218 댓글 2 좋아요 0 조회수 1115

숫자야구 문제 질문

해결됨

2주만에 통과하는 알고리즘 코딩테스트 (2024년)

숫자야구 문제 코드 부분에서 약간 오류가 있는 것 같아서 질문드립니다. number, strike, ball에 각각 힌트를 분배할 때 hint[0]~[2]가 아닌 arr[0]~[2]를 담으면서, arr[1]이 strike, arr[2]가 ball이 맞는 것 같은데 영상에 나오는 코드를 다음과 같이 고치면 될까요? for arr in hint: number = arr[0] strike = arr[1] ball = arr[2]

  • python
  • 코딩-테스트
  • 알고리즘
댓글 1 좋아요 5 조회수 703

expo init 에러

미해결

처음 배우는 리액트 네이티브

expo init mfp 를 실행했는데 이런 에러가 나오네요 어떻게 해결해야할까요

  • javascript
  • react-native
zzan99 댓글 2 좋아요 0 조회수 761

웹스크래핑 코드 리뷰 도와주세요 (초렙.. &#x27;-&#x27;)

미해결

네이버웹툰 만화 -> 신혼일기 -> 15화 제목을 가져와 보려고 하기와 같이 코드를 작성했습니다만 주피터 노트북에서 run 했을 때 [ ] 라고만 나옵니다 ㅠㅠ 어떻게 해야 할까요?? import requests from bs4 import BeautifulSoup as bs url = " https://comic.naver.com/webtoon/list?titleId=812354 " rsp = requests.get(url, verify=False) rsp.raise_for_status() soup = bs(rsp.text, "lxml") print(soup.find_all("span", attrs={"class": "EpisodeListList__title--lfIzU"}))

  • python
  • requests
  • scraping
김하린 댓글 1 좋아요 0 조회수 481

클로저 예시 함수에서 nonlocal 사용이 필요한 여부에 대해 질문드립니다.

미해결

우리를 위한 프로그래밍 : 파이썬 중급 (Inflearn Original)

안녕하세요. 강의 감사히 잘 듣고 있는 수강생입니다. 클로저 관련 내용을 듣다 궁금한 점이 있어 질문 드립니다. 해당 문제와 관련하여 다른 분들도 동일한 질문을 여러 번 올려주셨는데 "명확하게 이렇기 때문이다"라는 답변이 없이 외부 링크를 걸어주시거나 단답형으로 답변을 주셨던 것 같아 다시 질문을 드립니다. def closure_ex1(): # Free variable series = [] # 클로저 영역 def averager(v): # series = [] # 주석 해제 후 확인 series.append(v) print('inner >>> {} / {}'.format(series, len(series))) return sum(series) / len(series) return averager avg_closure1 = closure_ex1() # 잘못된 클로저 사용 def closure_ex2(): # Free variable cnt = 0 total = 0 def averager(v): cnt += 1 # cnt = cnt + 1 total += v return total / cnt return averager avg_closure2 = closure_ex2() 위 두 함수 closure_ex1과 closure_ex2를 비교하면 차이는 series는 list, cnt와 total은 int형 변수라는 것, averager 함수 내부에서 series는 append 작업을 하고, cnt와 total은 값을 더해주는 작업을 한다는 것 입니다. 그런데 closure_ex1에서는 오류가 나지 않고, closure_ex2에서는 averager 안에 nonlocal cnt, total을 작성하지 않으면 오류가 납니다. 여쭤보고 싶은 것은, [1] closure_ex1의 averager 함수 내부에 nonlocal series 라는 코드를 작성하지 않아도 되는 이유가 무엇 때문인가 입니다. closure_ex2의 averager 안에 nonlocal cnt, total 이 필요한 것은 내부 함수의 영역은 local 영역이고 closure_ex2 내부이면서 average 외부인 영역은 nonlocal 영역이기 때문에 local 영역에서 free variable을 write 작업하기 위해서는 nonlocal 변수 선언이 필요한 것으로 알고 있습니다. 하지만 series 변수에 대해서는 왜 nonlocal series 라는 코드가 필요하지 않은 것인지요? 제가 추가로 공부할 링크를 주시는 것은 감사하지만, 이 질문에 대한 답변을 명확하게 댓글로 작성해주시면 감사드리겠습니다. 다른 분들의 질문에 올려 주신 링크는 모두 읽어보았습니다. 또한 명확한 답변을 주시면 공부하시는 다른 분들께도 유용할 것이라고 생각합니다. 감사합니다. ps. 강의 영상을 확인하라는 답변도 주셨었는데, 수업에서 정확하게 list나 int형 자료의 scope 별 생명 주기까지 설명한 내용은 찾지 못하였으니 만약 해당 내용이 필요하다면 강의 시간을 알려주시면 감사드리겠습니다.

  • python
  • closure
힌턴 댓글 2 좋아요 1 조회수 470

규제 적용시 cross_val_score NaN반환

미해결

[개정판] 파이썬 머신러닝 완벽 가이드

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 강의 내용을 질문할 경우 몇분 몇초의 내용에 대한 것인지 반드시 기재 부탁드립니다. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요. 규제 부분 코드 실습 중 규제 클래스에 관해서 cross_val_score적용 시 NaN값이 반환되는 것이 확인되어 질문드립니다. 싸이킷런 버전의 경우 1.0.2버전인데 구글링을 했을 때는, 데이터 내에 NaN값이 있어서 그럴 것이라는데 제가 확인해봤을 때는 NaN값이 없었습니다. 혹시 버전과 관련된 문제일까요...? 동일 코드에 Ridge클래스대신 LinearRegression클래스로 대체시 정상적으로 코드가 동작하는 것을 확인하여 우선 Ridge클래스에 대한 문제로 간주하고 있습니다...ㅠ

  • python
  • 머신러닝
  • 통계
RYU 댓글 3 좋아요 0 조회수 734

sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1045, "Access denied for user 'root'@'localhost' (using password: YES)") 오류

해결됨

실전! FastAPI 입문

OS: macOS python 3.10 버전을 사용하고 있고, sqlalchemy 2.0.19, pymysql 1.1.0 등등 최신 패키지 사용중입니다. from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker DATABASE_URL = "mysql+pymysql://root:todos@127.0.0.1/todos" engine = create_engine(DATABASE_URL, echo=True) SessionFactory = sessionmaker(autocommit=False, autoflush=False, bind=engine) connection.py 는 위와 같이 동일하게 작성했고, session.scalar(select(1)); 실행시 아래와 같은 오류가 발생하여 더 이상 진행을 할 수가 없습니다. Traceback (most recent call last): File "/Users/someone/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/232.8660.197/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevconsole.py", line 364, in runcode coro = func() File "<input>", line 1, in <module> File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2296, in scalar return self._execute_internal( File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2131, in _execute_internal conn = self._connection_for_bind(bind) File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1998, in _connection_for_bind return trans._connection_for_bind(engine, execution_options) File "<string>", line 2, in _connection_for_bind File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/orm/state_changes.py", line 139, in _go ret_value = fn(self, *arg, **kw) File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1123, in _connection_for_bind conn = bind.connect() File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3264, in connect return self._connection_cls(self) File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 147, in __init__ Connection._handle_dbapi_exception_noconnection( File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2426, in _handle_dbapi_exception_noconnection raise sqlalchemy_exception.with_traceback(exc_info[2]) from e File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 145, in __init__ self._dbapi_connection = engine.raw_connection() File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3288, in raw_connection return self.pool.connect() File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 452, in connect return _ConnectionFairy._checkout(self) File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 1267, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 716, in checkout rec = pool._do_get() File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 169, in _do_get with util.safe_reraise(): File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 147, in __exit__ raise exc_value.with_traceback(exc_tb) File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 167, in _do_get return self._create_connection() File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 393, in _create_connection return _ConnectionRecord(self) File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 678, in __init__ self.__connect() File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 902, in __connect with util.safe_reraise(): File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 147, in __exit__ raise exc_value.with_traceback(exc_tb) File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 898, in __connect self.dbapi_connection = connection = pool._invoke_creator(self) File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 637, in connect return dialect.connect(*cargs, **cparams) File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 615, in connect return self.loaded_dbapi.connect(*cargs, **cparams) File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/pymysql/connections.py", line 358, in __init__ self.connect() File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/pymysql/connections.py", line 664, in connect self._request_authentication() File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/pymysql/connections.py", line 976, in _request_authentication auth_packet = _auth.caching_sha2_password_auth(self, auth_packet) File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/pymysql/_auth.py", line 267, in caching_sha2_password_auth pkt = _roundtrip(conn, data) File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/pymysql/_auth.py", line 120, in _roundtrip pkt = conn._read_packet() File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/pymysql/connections.py", line 772, in _read_packet packet.raise_for_error() File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/pymysql/protocol.py", line 221, in raise_for_error err.raise_mysql_exception(self._data) File "/Users/someone/.pyenv/versions/fastapi-env/lib/python3.10/site-packages/pymysql/err.py", line 143, in raise_mysql_exception raise errorclass(errno, errval) sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1045, "Access denied for user 'root'@'localhost' (using password: YES)") (Background on this error at: https://sqlalche.me/e/20/e3q8) Check the PassWord Hashing Method: If the MySQL server is using caching_sha2_password but the client (like PyMySQL) doesn't support it, it can give rise to such issues. You can switch the MySQL user's password hashing method to mysql_native_password . 이런 글도 있어서 따라하고 새로 비밀번호를 todos 로 넣어줬는데도 마찬가지네요. 더 참고할만한 내용이 있을까요?

  • python
  • 리팩토링
  • orm
  • FastAPI
  • pytest
댓글 1 좋아요 2 조회수 2357

추가 질문

미해결

비전공자를 위한 진짜 입문 올인원 개발 부트캠프

https://www.inflearn.com/questions/961239/%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8%EB%A5%BC-%EB%A7%88%EC%B9%98%EB%A9%B0-%EB%B0%B0%ED%8F%AC-%ED%8E%98%EC%9D%B4%EC%A7%80%EC%97%90%EC%84%9C-%EC%97%85%EB%A1%9C%EB%93%9C-%EC%9E%91%EB%8F%99%EC%9D%B4-%EC%95%88%EB%90%A8 "프로젝트를 마치며 배포 페이지에서 업로드 작동이 안됨" 이라는 제목의 질문글의 추가 질문입니다. =====================이전 질문 내용========================================== 상품 업로드에 관한 이슈 과정을 다 마치고, fly.io와 vercel.com 을 통하여 배포한 페이지 중에서 상품 업로드가 제대로 이뤄지지 않습니다. github 주소 : https://github.com/arominddo/Inflearn_full_stack_boot_camp vercel을 통해 배포된 web 어플리케이션 url : https://grab-market-client-ashen.vercel.app/ grab_market_web > src > upload > index.js에 코드 내용이 작성되어 있습니다. 배포된 페이지의 DB 초기화 문제 프로젝트를 전부 마치면서, 다시 한번 fly.io에 최신 코드로 재배포를 해보고 실험을 해보았는데도, web에서 특정 상품을 업로드하거나(오류가 나지 않았을 당시), 상품 구매하기 기능을 통하여 soldout 값을 1로 바꿔줬음에도, 약 5분이 지나면 DB가 배포 됐을 당시의 내용으로 계속 초기화가 됩니다. 해결 방안이 궁금합니다. ex) A라는 물건 업로드 -> 5분 지남 -> 새로고침 해보면 A라는 물건이 리스트에서 삭제 ex) B라는 물건 구매 하기 버튼 클릭 -> soldout 값 1로 변경 -> 약 5분 지남 -> 다시 soldout 값 0으로 복귀 =================================================================================== 위와 같은 이전 질문 내용에서 1번에 해당하는 답변으로, 어떤 오류 로그가 뜨냐고 물어보셔서 여기 다시 남겨봅니다. 위 사진은 vercel을 통해 배포 된 Web에서 upload를 시도하면 나오는 오류 로그입니다. upload 시도 시에 fly.io 모니터화면에서 볼 수 있는 오류입니다. 참고로, Local 환경에서 같은 코드로 npm start로 실행된 서버와 web에서는 업로드 기능이 잘 작동됩니다. 재부팅에 관련된 로그라고 생각되는 부분 캡쳐해서 보내드립니다. 이와 같은 로그가 뜨면서 배포된 서버의 내용이 배포 시점으로 돌아가는 것 같습니다. 그런데 로그를 보자면 reboot라는 것이 단순히 서버를 죽였다가 다시 올리는 것으로 생각 되는데, 배포된 서버가 돌아감에 있어서 업로드 되거나 값이 변했던 내용들이 다 사라지는 것이 이해가 되지 않습니다ㅠㅠ

  • HTML/CSS
  • javascript
  • react
  • node.js
  • react-native
  • 머신러닝
  • express
  • tensorflow
밍또 댓글 1 좋아요 0 조회수 284

현업에서 환경변수 같은 건 어떻게 관리하시나요?

해결됨

실리콘밸리 엔지니어가 가르치는 파이썬 장고 웹프로그래밍

민감한 URL 이라든지 환경변수를 통해 사용하고 싶은게 있을 때 강사님께서는 어떻게 관리하시는지 궁금합니다. 그냥 UNIX 환경에서 export url = http://example.com 이런식으로 하고 os 모듈을 통해 쓰고있는데, 더 보안상 좋은 방법이 있을까요?

  • python
  • django
  • bootstrap
  • rest-api
  • drf
댓글 1 좋아요 1 조회수 403

git 수업 부분 오류 발생했습니다

해결됨

비전공자를 위한 진짜 입문 올인원 개발 부트캠프

git remote add origin https://github.com/JIWONKIMS/grab-market-client.git git branch -M main git push -u origin main 터미널에 입력했을 때 마지막 git push -u origin main 부분을 실행하면 아래 에러가 뜹니다 fatal: failed to load library 'libcurl-4.dll' 에러 해결법이 뭔가요?

  • HTML/CSS
  • javascript
  • react
  • node.js
  • react-native
  • 머신러닝
  • express
  • tensorflow
Wakgood 댓글 1 좋아요 0 조회수 983

code push target 질문입니다

해결됨

배달앱 클론코딩 [with React Native]

안녕하세요 제로초님. 저는 현재 프로젝트 중간에 투입된 경우인데, 이번에 새로 코드 푸시를 도입을 하기로 했습니다. 강의를 보면서 차근차근 적용중에 있는데, 몇가지 질문을 드리고 싶습니다. 질문이 네 가지 있습니다. target 질문 제 프로젝트는 앱의 버전이 iOS 와 android 가 서로 상이합니다. 예로 들어 ios 의 버전은 4.0.0 대라면, android 는 2.0.0 대 입니다 두 가지의 버전을 맞춰주는게 좋은가요? 다음 앱 배포시엔 둘다 5.0.0 으로 올려준다던지 하는 방법으로요. 다시 타겟 질문입니다만, minor 버전을 올릴 때 제가 이해한게 맞는지 확인차 질문드립니다. "3.2.9" -> "3.3.0" 버전으로 올라갈때 code push 의 버전이 "3.2" 타겟이기 때문에 "3.2" 타겟의 코드 푸시가 적용되지 않는다. 만약 이후에 "3.3.1" 버전으로 올리고 싶다면 code push target 을 "3.3" 으로 올리고 "codepush:build" 스크립트 명령어를 실행한다. 그러면 "3.3.0" 버전에 반영이 된다 제가 이해한게 맞을까요? sentry와 함게 사용할때 의 질문. 다른 분이 질문을 올린것을 봤습니다만, 저는 아직 잘 이해가 안되어 재질문드립니다 ㅠㅠ Sentry.init 에 들어가는 release 부분에서 패키지제이슨버전만 적어주신다고 하신건지 궁금합니다. release: "3.1.0" 처럼 간단하게 버전만 입력한다는 말씀이실까요? 만약 맞다면 다시 1번 질문으로 돌아가서 Android, iOS 버전이 서로 다를땐 release: ANDROID ? '2.0.1' : '3.0.1', 이런식으로 안드로이드 일땐, 2.0.1, iOS 일 땐 3.0.1 로 작업하면 되는걸까요? dist 값 마찬가지로 sentry에 관련된 질문입니다. 제로초님은 dist 는 "dist값은 자기가 스스로 만드는 겁니다." 라고 답변을 달아주셨는데 dist 는 제가 스스로 타겟처럼 규칙을 정해서 만들어주면 되는걸까요? 센트리 공식문서를 봐도 헷갈리네요 ㅠㅠ 질문은 이상입니다. 언제나 뭐든지 처음 세팅하는게 힘드네요. ㅠㅠ

  • react-native
tjffldi123 댓글 1 좋아요 0 조회수 497

yarn android 시 메트로 서버가 자동으로 시작되지 않습니다.

미해결

배달앱 클론코딩 [with React Native]

$ yarn android yarn run v1.22.19 $ react-native run-android info Starting JS server... info Launching emulator... info Successfully launched emulator. info Installing the app... > Configure project :react-native-flipper WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL. > Task :app:installDebug Installing APK 'app-debug.apk' on 'Nexus_5_API_30(AVD) - 11' for :app:debug Installed on 1 device. Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. See https://docs.gradle.org/8.0.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 7s 72 actionable tasks: 2 executed, 70 up-to-date info Connecting to the development server... 8081 info Starting the app on "emulator-5554"... Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.fooddelivery/.MainActivity } Done in 16.52s. 그냥 yarn android만 입력시에는 터미널이 따로 하나 띄워지는데 메트로 서버 없이 빈 터미널이 띄워집니다. RR로 리셋후 yarn start로 매트로서버를 수동으로 실행시킨뒤에는 에뮬레이터 키고 연결이 잘 되는데 yarn android만 입력했을때는 메트로 서버가 자동으로 실행이 안되는데 해결 방법이 있을까요? 윈도우 11 java 11.0.20 node 18.16.1 사용중에 있습니다.

  • react-native
grs0412 댓글 1 좋아요 0 조회수 855

강의 외 추가학습 (카카오 소셜로그인)

해결됨

배달앱 클론코딩 [with React Native]

우선 강의를 완강하고 추가학습으로 카카오 소셜로그인을 구현해보고 있습니다. (강의 너무 잘들었습니다!) https://github.com/crossplatformkorea/react-native-kakao-login 위 라이브러리 사용해서 카카오 개발자 페이지의 설정도 모두 마치고 플랫폼 등록도 하여 시뮬레이터로 시도하면 아래와 같은 오류가 발생합니다. Optional({ error = misconfigured; "error_code" = KOE009; "error_description" = "invalid android_key_hash or ios_bundle_id or web_site_url"; }) 찾아보니 전부 Xcode의 번들 ID와 카카오에 등록한 IOS 플랫폼 번들 ID가 달라서 그렇다고 하는데 실기기에 연결하면 정상적으로 카카오에 로그인시도 성공되어 응답값도 받고 있습니다. 구글링을 해도 도저히 해결이 안되서 이렇게 질문을 남기게 되었는데 혹시 제가 놓친 부분이 있을까요? 번들 ID 문제인가 싶어서 다른걸로도 바꿔서 시도해봤는데 역시 시뮬레이터에서만 안됩니다ㅠ

  • react-native
댓글 1 좋아요 0 조회수 563

IOS 실기기 연결시 .env 환경변수

미해결

배달앱 클론코딩 [with React Native]

아이폰 실기기 연결하여 테스트 중인데, .env값 수정하였는데 계속 이전 값을 들고옵니다. (ex. API_URL에 설정해놓은 localhost값을 피씨 아이피로 변경 -> 재빌드해도 계속 이전 localhost를 들고옴) 재빌드, 메트로 서버 종료, 앱삭제 등 여러가지 시도 하였는데 계속 이전 값을 유지하는데 보통 환경변수 파일 바꾸면 어떻게 하시는지 궁금합니다. 이런 경우엔 빌드 폴더 클린 하는 방법말고 없을까여?

  • react-native
댓글 2 좋아요 0 조회수 607

부동산 매물 강좌 관련 문의

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

안녕하세요! 강사님 강의를 끝까지 다 수강하였습니다. 너무 도움이 많이 되었습니다. 감사합니다. 부동산 매물 강의에 대한 공지를 보고 메일로 문의 드렸는데 아직 피드백이 오지 않아 이렇게 질문글로 문의를 드리게 되었습니다! 메일 문의 한 번만 확인 부탁드립니다. 감사합니다!

  • python
  • 웹-크롤링
댓글 1 좋아요 0 조회수 275

TypeError: Cannot read property 'status' of undefined

미해결

배달앱 클론코딩 [with React Native]

안녕하세요 제로초님! 회원가입을 하려면, 계속 아래와 같은 에러가 터미널에 뜹니다. error: [TypeError: Cannot read property 'status' of undefined] ERROR undefined 어디가 잘 못 된걸까요,, .env파일 확인 해서 제 IP주소 확인했습니다. signUp 부분을 확인해야하는건지,, import React, {useCallback, useRef, useState, useEffect} from 'react'; import { ActivityIndicator, Alert, Platform, Pressable, StyleSheet, Text, TextInput, View, } from 'react-native'; import {NativeStackScreenProps} from '@react-navigation/native-stack'; import DismissKeyboardView from '../components/DismissKeyboardView'; import axios, {AxiosError} from 'axios'; import Config from 'react-native-config'; // 혹시 이거 설정법 아시나요 import {RootStackParamList} from '../../AppInner'; type SignUpScreenProps = NativeStackScreenProps<RootStackParamList, 'SignUp'>; function SignUp({navigation}: SignUpScreenProps) { const [loading, setLoading] = useState(false); const [email, setEmail] = useState(''); const [name, setName] = useState(''); const [password, setPassword] = useState(''); const emailRef = useRef<TextInput | null>(null); const nameRef = useRef<TextInput | null>(null); const passwordRef = useRef<TextInput | null>(null); useEffect(() => { console.log('email: ', email); console.log('name: ', name); console.log('password: ', password); }, [email, name, password]); const onChangeEmail = useCallback((text: string) => { setEmail(text.trim()); }, []); const onChangeName = useCallback((text: string) => { setName(text.trim()); }, []); const onChangePassword = useCallback((text: string) => { setPassword(text.trim()); }, []); const onSubmit = useCallback(async () => { if (loading) { return; } if (!email || !email.trim()) { return Alert.alert('알림', '이메일을 입력해주세요.'); } if (!name || !name.trim()) { return Alert.alert('알림', '이름을 입력해주세요.'); } if (!password || !password.trim()) { return Alert.alert('알림', '비밀번호를 입력해주세요.'); } if ( !/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/.test( email, ) ) { return Alert.alert('알림', '올바른 이메일 주소가 아닙니다.'); } if (!/^(?=.*[A-Za-z])(?=.*[0-9])(?=.*[$@^!%*#?&]).{8,50}$/.test(password)) { return Alert.alert( '알림', '비밀번호는 영문,숫자,특수문자($@^!%*#?&)를 모두 포함하여 8자 이상 입력해야합니다.', ); } console.log(email, name, password); try { //:TODO log 삭제 console.log('LOGIN REQUEST'); console.log(Config.API_URL); setLoading(true); console.log(email); console.log(name); console.log(password); const response = await axios.post(`${Config.API_URL}/user`, { email, name, password, }); console.log('response: ', response.data); Alert.alert('알림', '회원가입 되었습니다.'); navigation.navigate('SignIn'); } catch (error) { console.log('error: ', error); const errorResponse = (error as AxiosError).response; console.error(errorResponse); if (errorResponse) { Alert.alert('알림'); } } finally { setLoading(false); } }, [loading, navigation, email, name, password]); const canGoNext = email && name && password; return ( <DismissKeyboardView> <View style={styles.inputWrapper}> <Text style={styles.label}>이메일</Text> <TextInput style={styles.textInput} onChangeText={onChangeEmail} placeholder="이메일을 입력해주세요" placeholderTextColor="#666" textContentType="emailAddress" value={email} returnKeyType="next" clearButtonMode="while-editing" ref={emailRef} onSubmitEditing={() => nameRef.current?.focus()} blurOnSubmit={false} /> </View> <View style={styles.inputWrapper}> <Text style={styles.label}>이름</Text> <TextInput style={styles.textInput} placeholder="이름을 입력해주세요." placeholderTextColor="#666" onChangeText={onChangeName} value={name} textContentType="name" returnKeyType="next" clearButtonMode="while-editing" ref={nameRef} onSubmitEditing={() => passwordRef.current?.focus()} blurOnSubmit={false} /> </View> <View style={styles.inputWrapper}> <Text style={styles.label}>비밀번호</Text> <TextInput style={styles.textInput} placeholder="비밀번호를 입력해주세요(영문,숫자,특수문자)" placeholderTextColor="#666" onChangeText={onChangePassword} value={password} keyboardType={Platform.OS === 'android' ? 'default' : 'ascii-capable'} textContentType="password" secureTextEntry returnKeyType="send" clearButtonMode="while-editing" ref={passwordRef} onSubmitEditing={onSubmit} /> </View> <View style={styles.buttonZone}> <Pressable style={ canGoNext ? StyleSheet.compose(styles.loginButton, styles.loginButtonActive) : styles.loginButton } disabled={!canGoNext || loading} onPress={onSubmit}> {loading ? ( <ActivityIndicator color="white" /> ) : ( <Text style={styles.loginButtonText}>회원가입</Text> )} </Pressable> </View> </DismissKeyboardView> ); } const styles = StyleSheet.create({ textInput: { padding: 5, borderBottomWidth: StyleSheet.hairlineWidth, }, inputWrapper: { padding: 20, }, label: { fontWeight: 'bold', fontSize: 16, marginBottom: 20, }, buttonZone: { alignItems: 'center', }, loginButton: { backgroundColor: 'gray', paddingHorizontal: 20, paddingVertical: 10, borderRadius: 5, marginBottom: 10, }, loginButtonActive: { backgroundColor: 'blue', }, loginButtonText: { color: 'white', fontSize: 16, }, }); export default SignUp; 아니면 AppInner부분인건지 모르겟습니다. import SignIn from './src/pages/SignIn'; import SignUp from './src/pages/SignUp'; import Orders from './src/pages/Orders'; import Delivery from './src/pages/Delivery'; import Settings from './src/pages/Settings'; import * as React from 'react'; import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; import {createNativeStackNavigator} from '@react-navigation/native-stack'; import {useSelector} from 'react-redux'; import {RootState} from './src/store/reducer'; import useSocket from './src/hooks/useSocket'; import {useEffect} from 'react'; import EncryptedStorage from 'react-native-encrypted-storage'; import axios, {AxiosError} from 'axios'; import {Alert} from 'react-native'; import userSlice from './src/slices/user'; import {useAppDispatch} from './src/store'; import Config from 'react-native-config'; import orderSlice from './src/slices/order'; export type LoggedInParamList = { Orders: undefined; Settings: undefined; Delivery: undefined; Complete: {orderId: string}; }; export type RootStackParamList = { SignIn: undefined; SignUp: undefined; }; const Tab = createBottomTabNavigator(); const Stack = createNativeStackNavigator<RootStackParamList>(); function AppInner() { const dispatch = useAppDispatch(); const isLoggedIn = useSelector((state: RootState) => !!state.user.email); console.log('isLoggedIn', isLoggedIn); const [socket, disconnect] = useSocket(); // 앱 실행 시 토큰 있으면 로그인하는 코드 useEffect(() => { const getTokenAndRefresh = async () => { try { const token = await EncryptedStorage.getItem('refreshToken'); if (!token) { return; } const response = await axios.post( `${Config.API_URL}/refreshToken`, {}, { headers: { authorization: `Bearer ${token}`, }, }, ); dispatch( userSlice.actions.setUser({ name: response.data.data.name, email: response.data.data.email, accessToken: response.data.data.accessToken, }), ); } catch (error) { console.error(error); if ((error as AxiosError as any).response?.data.code === 'expired') { Alert.alert('알림', '다시 로그인 해주세요.'); } } }; getTokenAndRefresh(); }, [dispatch]); useEffect(() => { const callback = (data: any) => { console.log(data); dispatch(orderSlice.actions.addOrder(data)); }; if (socket && isLoggedIn) { socket.emit('acceptOrder', 'hello'); socket.on('order', callback); } return () => { if (socket) { socket.off('order', callback); } }; }, [dispatch, isLoggedIn, socket]); useEffect(() => { if (!isLoggedIn) { console.log('!isLoggedIn', !isLoggedIn); disconnect(); } }, [isLoggedIn, disconnect]); useEffect(() => { axios.interceptors.response.use( response => { return response; }, async error => { const { config, response: {status}, } = error; if (status === 419) { if (error.response.data.code === 'expired') { const originalRequest = config; const refreshToken = await EncryptedStorage.getItem('refreshToken'); // token refresh 요청 const {data} = await axios.post( `${Config.API_URL}/refreshToken`, // token refresh api {}, {headers: {authorization: `Bearer ${refreshToken}`}}, ); // 새로운 토큰 저장 dispatch(userSlice.actions.setAccessToken(data.data.accessToken)); originalRequest.headers.authorization = `Bearer ${data.data.accessToken}`; // 419로 요청 실패했던 요청 새로운 토큰으로 재요청 return axios(originalRequest); } } return Promise.reject(error); }, ); }, [dispatch]); return isLoggedIn ? ( <Tab.Navigator> <Tab.Screen name="Orders" component={Orders} options={{title: '오더 목록'}} /> <Tab.Screen name="Delivery" component={Delivery} options={{title: '내 오더'}} /> <Tab.Screen name="Settings" component={Settings} options={{title: '내 정보'}} /> </Tab.Navigator> ) : ( <Stack.Navigator> <Stack.Screen name="SignIn" component={SignIn} options={{title: '로그인'}} /> <Stack.Screen name="SignUp" component={SignUp} options={{title: '회원가입'}} /> </Stack.Navigator> ); } export default AppInner;

  • react-native
박채연 댓글 4 좋아요 0 조회수 1706

프로젝트를 마치며 배포 페이지에서 업로드 작동이 안됨

미해결

비전공자를 위한 진짜 입문 올인원 개발 부트캠프

상품 업로드에 관한 이슈 과정을 다 마치고, fly.io와 vercel.com 을 통하여 배포한 페이지 중에서 상품 업로드가 제대로 이뤄지지 않습니다. github 주소 : https://github.com/arominddo/Inflearn_full_stack_boot_camp vercel을 통해 배포된 web 어플리케이션 url : https://grab-market-client-ashen.vercel.app/ grab_market_web > src > upload > index.js에 코드 내용이 작성되어 있습니다. 배포된 페이지의 DB 초기화 문제 프로젝트를 전부 마치면서, 다시 한번 fly.io에 최신 코드로 재배포를 해보고 실험을 해보았는데도, web에서 특정 상품을 업로드하거나(오류가 나지 않았을 당시), 상품 구매하기 기능을 통하여 soldout 값을 1로 바꿔줬음에도, 약 5분이 지나면 DB가 배포 됐을 당시의 내용으로 계속 초기화가 됩니다. 해결 방안이 궁금합니다. ex) A라는 물건 업로드 -> 5분 지남 -> 새로고침 해보면 A라는 물건이 리스트에서 삭제 ex) B라는 물건 구매 하기 버튼 클릭 -> soldout 값 1로 변경 -> 약 5분 지남 -> 다시 soldout 값 0으로 복귀

  • HTML/CSS
  • javascript
  • react
  • node.js
  • react-native
  • 머신러닝
  • express
  • tensorflow
밍또 댓글 2 좋아요 0 조회수 462

파이썬 예제 코드 실습 에러

미해결

퀀트 투자를 위한 주식 자동매매 봇 만들기 Part 1

예제 코드를 파이참을 실행해서 어느 프로그램 경로에다가 어떤식으로 연결해야 실행이 되는지 잘 모르겠습니다. 현재 예제 코드가 실행이 잘 안되서요

  • python
  • 투자
  • 퀀트
헌준 댓글 2 좋아요 0 조회수 543

인기 태그

인프런 TOP Writers

주간 인기글