로그인 방식을 구현하면서, 쿠키로만 개발할 경우 완전히 백엔드에 의존하게 되어 로컬로, 동시에 키고 개발을 하지 않는이상, 도메인간 불일치를 해결 할 방법이 없어, msw를 사용해야 한다고, 이전에 말씀해주셨습니다!! 보통, 회사나, 개인 소프트웨어를 만들 때 어떤 방식으로 로그인을 주로 만드시는지 조금 알고 싶어 궁금하여 질문을 남깁니다!! 로그인 방식 고찰 로그인 성공시, accessToken을 body로 받고, refreshToken은, httpOnly 쿠키로 받는 경우 (서버에서, DB or Redis를 통해 refreshToken 관리) → 인증 필요 요청 (Bearer accessToken), 리프레시 필요 요청 (refreshToken 심긴 쿠키를 바탕으로 요청) - DB에서 관리하는 것 보다, redis를 통해 관리했을 떄 읽기 속도가 빠름을 확인! 응답: accessToken과 refreshToken 모두 body로 클라이언트에게 전달. 인증 필요 요청과, 리프레시 토큰 재발급 요청 모두 헤더의 Bearer에 accessToken이나, refreshToken을 넣어서 전달.) 현재 방식: accessToken, refreshToken 모두 쿠키로 응답받고, 요청또한, 쿠키를 포함하여 전달. 제로초님은, Next.js를 활용하여, 웹 사이트를 만드실 떄, 어떠한 방식으로 로그인을 구현하시는지 궁금하고, 많은 회사에서 사용하는 방식은 보통 어떤 방식인지도 알고싶습니다!
먼저 next와 react의 버전은 각각 15버전과 19버전입니다 next 15 부터는 http.ts 의 코드가 간결하게 바뀌어서 적용해보던 중 세팅 단계에서 해당 오류가 발생하였습니다 TypeError: Cannot read properties of undefined (reading 'url' 구글에 검색해보니 최신버전에서도 발생하는 것 같습니다 ㅠㅠ
SignupModal 에서 에러가 하나 나오는데 관련해서 질문드립니다. S2322: Type '(formData: FormData) => Promise<{ message: string; } | undefined>' is not assignable to type 'NonNullable<string | ((formData: FormData) => void | Promise<void>) | undefined>'.<br/>Type '(formData: FormData) => Promise<{ message: string; } | undefined>' is not assignable to type '(formData: FormData) => void | Promise<void>'.<br/>Type 'Promise<{ message: string; } | undefined>' is not assignable to type 'void | Promise<void>'.<br/>Type 'Promise<{ message: string; } | undefined>' is not assignable to type 'Promise<void>'.<br/>Type '{ message: string; } | undefined' is not assignable to type 'void'.<br/>Type '{ message: string; }' is not assignable to type 'void'. 이런 에러가 나옵니다. formData 의 타입이 정확하지 않아서 생기는 에러 같습니다. 근데 정상적으로 실행은 됩니다. 제 꺼에선 이렇게 에러가 나오는데 제로초님 화면에서는 에러가 나오는 것 같지 않아서 어떻게 그렇게 된 것인지 궁금해서 질문 남깁니다. 감사합니다.
기존에 강의로 msw로 코드만들었던 수강생입니다. 여러개의 질문과 에러?라고할만한 사항이 있는데요. 기존강의에는 http.js 파일에서 express 기반으로 서버를 만들어서 9090포트를 사용했는데요. 새로 강의하신 내용에서는 express를 배제하고 코드가 간결하게 바꿨는데 이렇게 바꾼 내용의 대해서 조금 설명 부탁드립니다. 간략히 알기로는 기존 MSW는 클라이언트(브라우저)에서 동작하기 때문에 서버에서 html 요청이 발생하기 때문에 요청을 가로챌수 없기 때문에 express썻다고 알고있습니다. 이게 맞을까요? 그리고 바뀐코드는 이런문제가 해결이 된건가요? 1번의 문제가 해결되었다면, 기존의 9090 서버포트와 더불어 npm run mock를 실행하여 서버를 동작했던걸로 알고있는데 이기능은 필요한가요? msw 세팅과 .env 강의부분에서 환경변수를 api에 직접 넣도록 수정했는데, 이전꺼랑 차이가 뭔가요? 추가로 클라이언트컴포넌트에서는 환경변수가 콘솔로 읽히고있는데 handler에서는 읽히지 않고있습니다. 코드는 이전강의 코드(백엔드 db연결전까지)와 같고요. 추가로 nextjs나 react를 버전업을 하지는 않았습니다. 이유가뭔지 유추해주실수있을까요?
❗ 질문 작성시 꼭 참고해주세요 현재 문제(또는 에러)와 코드(또는 github) 를 첨부해주세요. 맥/윈도우, 안드로이드/iOS, ReactNative, Node 버전 등의 개발환경 을 함께 적어주시면 도움이 됩니다. 에러메세지는 일부분이 아닌 전체 상황 을 올려주세요. ( 일부만 자르거나 복사하지말아주세요 .) 개발환경/코드에 대한 정보가 없을경우 답변이 어렵습니다. [문제 상황] npx react-native@0.72.6 init MatzipApp --version 0.72.6 해당 명령어를 입력했을 때 반응이 전혀 없고 파일생성이 되지 않습니다. [현재상황] 터미널에 npm list -g --depth=0 명령어를 입력했을 때 나타나는 패키지 목록들입니다. node와 npm 버전 그리고 chocolatey 정상 설치된 부분입니다. adb 명령어 입력시 정상 작동되고 있는 부분입니다. Andriod Studio 환경변수 설정 또한 sdk 파일 위치 확인 후 c브라이느/Andriod App 경로로 정상적으로 환경변수 설정되어있습니다. [해결하기위한 실행한 방안들] npm uninstall -g react-native-cli 명령어를 통해 react-natice-cli 제거 후 npm install -g react-native 전역으로 설치 후 버전 확인 (버전확인이 뜨지 않음 첫 문제와 같은 상황) node.js 재설치 andriod studio 최신버전으로 재설치 andriod studio 패키지 설치 모두 완료 npm cache clean --force 명령어를 통해 캐시 초기화 후 진행 관리자 권한으로 실행 후 진행 블로그와 커뮤니티를 확인하면서 해결을 시도하였는데 해결이 되지 않아 질문드립니다 ㅠㅠ npx react-native 가 들어간 명령어는 하나도 먹질 않고 있습니다... 섹션1에서 멈춰있어요.. 도와주세요 ㅠ
"섹션4 그런데 백엔드 개발자가 API를 아직 못 만들었다"의 " msw 세팅과 .env" 강좌가 8분 38초까지 영상이 검은 화면으로 나옵니다. 해당 영상에서 검은 화면 중간 중간 노란색 안내 문구는 나오는 것과 다른 영상에서는 해당 증상이 보이지 않은 것으로 보아서 제 환경에서 해결할 수 없는 문제로 보이는데, 확인 한번 부탁드립니다.
2024-04-02 시작으로.. 2024-12-08 강의 완강하였습니다ㅠㅠ 앱, 프론트 개발이 완전 처음이라 얼마나 헤맸는지.. 강사님과 수강자분들의 도움이 없었으면 다음 생에도 완강을 못했을 수도 있지 않았을까 생각이 드네요.... 수많은 질문 속에서도 답변 주셔서 이렇게 마무리하게 되었습니다. 강의 듣는동안 너무 재밌게 진행하였고 다음 강의가 나온다면 결제 준비하겠습니다 ㅎ0ㅎ 고생하셨습니다 강사님 그리고 감사합니다~~! 🙇♂
npm install 설치한 뒤 개발 서버 키기 위해서 npm run dev 입력했는데 이런 에러가 뜹니다. 인터넷 찾아 본 결과 npm install watchman 이거 해줘야 에러 안 나는 거 알고 있지만, 번번이 프로젝트 생성할 때마다 이런 에러가 꼭 뜹니다. 혹시 해결 방법이 있을까요?
환경: mac m1 npx react-native start --reset-cache를 했는데 (node:73693) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created) ▒▒▓▓▓▓▒▒ ▒▓▓▓▒▒░░▒▒▓▓▓▒ ▒▓▓▓▓░░░▒▒▒▒░░░▓▓▓▓▒ ▓▓▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▓▓ ▓▓░░░░░▒▓▓▓▓▓▓▒░░░░░▓▓ ▓▓░░▓▓▒░░░▒▒░░░▒▓▒░░▓▓ ▓▓░░▓▓▓▓▓▒▒▒▒▓▓▓▓▒░░▓▓ ▓▓░░▓▓▓▓▓▓▓▓▓▓▓▓▓▒░░▓▓ ▓▓▒░░▒▒▓▓▓▓▓▓▓▓▒░░░▒▓▓ ▒▓▓▓▒░░░▒▓▓▒░░░▒▓▓▓▒ ▒▓▓▓▒░░░░▒▓▓▓▒ ▒▒▓▓▓▓▒▒ warning: the transform cache was reset. Welcome to Metro v0.76.8 Fast - Scalable - Integrated r - reload the app d - open developer menu i - run on iOS a - run on Android warning: Watchman `watch-project` returned a warning: Recrawled this watch 1 time, most recently because: MustScanSubDirs UserDroppedTo resolve, please review the information on https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl To clear this warning, run: `watchman watch-del '/Users/teng/MatzipApp' ; watchman watch-project '/Users/teng/MatzipApp'` warning: Watchman `query` returned a warning: Recrawled this watch 1 time, most recently because: MustScanSubDirs UserDroppedTo resolve, please review the information on https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl To clear this warning, run: `watchman watch-del '/Users/teng/MatzipApp' ; watchman watch-project '/Users/teng/MatzipApp'` Recrawled this watch 1 time, most recently because: MustScanSubDirs UserDroppedTo resolve, please review the information on https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl To clear this warning, run: `watchman watch-del '/Users/teng/MatzipApp' ; watchman watch-project '/Users/teng/MatzipApp'` Recrawled this watch 1 time, most recently because: MustScanSubDirs UserDroppedTo resolve, please review the information on https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl To clear this warning, run: `watchman watch-del '/Users/teng/MatzipApp' ; watchman watch-project '/Users/teng/MatzipApp'` info Opening the app on Android... info JS server already running. info Launching emulator... info Successfully launched emulator. info Installing the app... > Task :gradle-plugin:compileKotlin UP-TO-DATE > Task :gradle-plugin:compileJava NO-SOURCE > Task :gradle-plugin:pluginDescriptors UP-TO-DATE > Task :gradle-plugin:processResources UP-TO-DATE > Task :gradle-plugin:classes UP-TO-DATE > Task :gradle-plugin:jar UP-TO-DATE > Task :gradle-plugin:inspectClassesForKotlinIC UP-TO-DATE > Configure project :react-native-reanimated Android gradle plugin: 7.4.2 Gradle: 8.0.1 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 :react-native-gesture-handler:compileDebugLibraryResources > Task :app:mergeDebugResources > Task :app:processDebugMainManifest > Task :app:processDebugManifest > Task :app:processDebugManifestForPackage > Task :react-native-gesture-handler:parseDebugLocalResources > Task :react-native-masked-view_masked-view:compileDebugLibraryResources > Task :react-native-reanimated:parseDebugLocalResources > Task :react-native-reanimated:compileDebugLibraryResources > Task :react-native-masked-view_masked-view:parseDebugLocalResources > Task :react-native-safe-area-context:compileDebugLibraryResources > Task :react-native-safe-area-context:parseDebugLocalResources > Task :react-native-gesture-handler:generateDebugBuildConfig > Task :react-native-reanimated:generateDebugBuildConfig > Task :react-native-screens:compileDebugLibraryResources > Task :react-native-reanimated:packageNdkLibs NO-SOURCE > Task :react-native-reanimated:javaPreCompileDebug > Task :react-native-gesture-handler:javaPreCompileDebug > Task :react-native-masked-view_masked-view:generateDebugBuildConfig > Task :react-native-masked-view_masked-view:javaPreCompileDebug > Task :react-native-safe-area-context:generateDebugBuildConfig > Task :react-native-safe-area-context:javaPreCompileDebug > Task :react-native-screens:generateDebugBuildConfig > Task :react-native-screens:javaPreCompileDebug > Task :react-native-screens:parseDebugLocalResources > Task :app:mergeDebugShaders UP-TO-DATE > Task :app:compileDebugShaders NO-SOURCE > Task :app:generateDebugAssets UP-TO-DATE > Task :react-native-gesture-handler:mergeDebugShaders > Task :react-native-gesture-handler:compileDebugShaders NO-SOURCE > Task :react-native-gesture-handler:generateDebugAssets UP-TO-DATE > Task :react-native-gesture-handler:packageDebugAssets > Task :react-native-masked-view_masked-view:mergeDebugShaders > Task :react-native-masked-view_masked-view:compileDebugShaders NO-SOURCE > Task :react-native-masked-view_masked-view:generateDebugAssets UP-TO-DATE > Task :react-native-masked-view_masked-view:packageDebugAssets > Task :react-native-reanimated:mergeDebugShaders > Task :react-native-reanimated:compileDebugShaders NO-SOURCE > Task :react-native-reanimated:generateDebugAssets UP-TO-DATE > Task :react-native-reanimated:packageDebugAssets > Task :react-native-safe-area-context:mergeDebugShaders > Task :react-native-safe-area-context:compileDebugShaders NO-SOURCE > Task :react-native-safe-area-context:generateDebugAssets UP-TO-DATE > Task :react-native-safe-area-context:packageDebugAssets > Task :react-native-screens:mergeDebugShaders > Task :react-native-screens:compileDebugShaders NO-SOURCE > Task :react-native-screens:generateDebugAssets UP-TO-DATE > Task :react-native-screens:packageDebugAssets > Task :react-native-reanimated:generateDebugRFile > Task :react-native-safe-area-context:generateDebugRFile > Task :app:mergeDebugAssets UP-TO-DATE > Task :react-native-masked-view_masked-view:generateDebugRFile > Task :react-native-screens:generateDebugRFile > Task :react-native-gesture-handler:generateDebugRFile > Task :react-native-reanimated:compileDebugJavaWithJavac FAILED 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 82 actionable tasks: 70 executed, 12 up-to-date info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor /Users/teng/MatzipApp/frontend/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:440: error: switch rules are not supported in -source 11 case "opacity" -> { ^ (use -source 14 or higher to enable switch rules) /Users/teng/MatzipApp/frontend/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java:356: error: pattern matching in instanceof is not supported in -source 11 if (props.get(Snapshot.TRANSFORM_MATRIX) instanceof ReadableNativeArray matrixArray) { ^ (use -source 16 or higher to enable pattern matching in instanceof) 2 errors FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':react-native-reanimated:compileDebugJavaWithJavac'. > Compilation failed; see the compiler error output for details. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 34s info Run CLI with --verbose flag for more details. 위와 같이 에러가 발생합니다. Drawer를 설치한 이후부터 계속 막히네요 ... `plugins: ['react-native-reanimated/plugin'],`도 했습니다. 추가적으로 다른 질문들도 봤는데 다 해결이 안 됐습니다 ㅜㅜ
❗ 질문 작성시 꼭 참고해주세요 현재 문제(또는 에러)와 코드(또는 github) 를 첨부해주세요. 맥/윈도우, 안드로이드/iOS, ReactNative, Node 버전 등의 개발환경 을 함께 적어주시면 도움이 됩니다. 에러메세지는 일부분이 아닌 전체 상황 을 올려주세요. ( 일부만 자르거나 복사하지말아주세요 .) 개발환경/코드에 대한 정보가 없을경우 답변이 어렵습니다. npx react-native를 통해 프로젝트를 다운로드 하는데 ✖ Installing CocoaPods error error Installing Cocoapods failed. This doesn't affect project initialization and you can safely proceed. However, you will need to install Cocoapods manually when running iOS, follow additional steps in "Run instructions for iOS" section. Error: An error occured while trying to install CocoaPods, which is required by this template. Please try again manually: sudo gem install cocoapods. CocoaPods documentation: https://cocoapods.org/ 다음과 같은 에러가 발생했습니다. >> sudo gem install cocoapods Password: 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 수동으로 설치했는데 안 돼서 ruby 버전을 봤는데 >> ruby -v ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin24] 루비를 2.7 버전 이상으로 만들어주기 위해 rbenv를 다운받고 rbenv install -l 3.1.6 3.2.6 3.3.6 jruby-9.4.9.0 mruby-3.3.0 picoruby-3.0.0 truffleruby-24.1.1 truffleruby+graalvm-24.1.1 rbenv install 3.3.6 ruby-build: using openssl@3 from homebrew ==> Downloading ruby-3.3.6.tar.gz... -> curl -q -fL -o ruby-3.3.6.tar.gz https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.6.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 21.1M 100 21.1M 0 0 2434k 0 0:00:08 0:00:08 --:--:-- 2470k ==> Installing ruby-3.3.6... ruby-build: using libyaml from homebrew ruby-build: using gmp from homebrew -> ./configure "--prefix=$HOME/.rbenv/versions/3.3.6" --with-openssl-dir=/usr/local/opt/openssl@3 --enable-shared --with-libyaml-dir=/usr/local/opt/libyaml --with-gmp-dir=/usr/local/opt/gmp --with-ext=openssl,psych,+ -> make -j 8 *** Following extensions are not compiled: openssl: Could not be configured. It will not be installed. /private/var/folders/yk/px23h3t50fn50y19rbdwp81r0000gn/T/ruby-build.20241124141446.8409.VoUaep/ruby-3.3.6/ext/openssl/extconf.rb:122: OpenSSL library could not be found. You might want to use --with-openssl-dir=<dir> option to specify the prefix where OpenSSL is installed. Check /var/folders/yk/px23h3t50fn50y19rbdwp81r0000gn/T/ruby-build.20241124141446.8409.VoUaep/ruby-3.3.6/ext/openssl/mkmf.log for more details. psych: Could not be configured. It will not be installed. Check /var/folders/yk/px23h3t50fn50y19rbdwp81r0000gn/T/ruby-build.20241124141446.8409.VoUaep/ruby-3.3.6/ext/psych/mkmf.log for more details. BUILD FAILED (macOS 15.1.1 on arm64 using ruby-build 20241105) You can inspect the build directory at /var/folders/yk/px23h3t50fn50y19rbdwp81r0000gn/T/ruby-build.20241124141446.8409.VoUaep See the full build log at /var/folders/yk/px23h3t50fn50y19rbdwp81r0000gn/T/ruby-build.20241124141446.8409.log 이렇게 에러가 발생합니다 .. 이틀째 해결방법을 찾는데 계속 막혀서 글 올립니다 감사합니다 ㅜㅜ
❗ 질문 작성시 꼭 참고해주세요 현재 문제(또는 에러)와 코드(또는 github) 를 첨부해주세요. 맥/윈도우, 안드로이드/iOS, ReactNative, Node 버전 등의 개발환경 을 함께 적어주시면 도움이 됩니다. 에러메세지는 일부분이 아닌 전체 상황 을 올려주세요. ( 일부만 자르거나 복사하지말아주세요 .) 개발환경/코드에 대한 정보가 없을경우 답변이 어렵습니다. Macbook Ari M1 / MacOS 15.0.1 rbenv [루비버전] rbenv install 3.2.2 rbenv: /Users/teng/.rbenv/versions/3.2.2 already exists continue with installation? (y/N) y ruby-build: using openssl@3 from homebrew ==> Downloading ruby-3.2.2.tar.gz... -> curl -q -fL -o ruby-3.2.2.tar.gz https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.2.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 19.5M 100 19.5M 0 0 16.5M 0 0:00:01 0:00:01 --:--:-- 16.5M ==> Installing ruby-3.2.2... ruby-build: using readline from homebrew ruby-build: using libyaml from homebrew ruby-build: using gmp from homebrew -> ./configure "--prefix=$HOME/.rbenv/versions/3.2.2" --with-openssl-dir=/usr/local/opt/openssl@3 --enable-shared --with-readline-dir=/usr/local/opt/readline --with-libyaml-dir=/usr/local/opt/libyaml --with-gmp-dir=/usr/local/opt/gmp --with-ext=openssl,psych,+ -> make -j 8 BUILD FAILED (macOS 15.0.1 on arm64 using ruby-build 20241105) You can inspect the build directory at /var/folders/yk/px23h3t50fn50y19rbdwp81r0000gn/T/ruby-build.20241123200520.32443.l96uOO See the full build log at /var/folders/yk/px23h3t50fn50y19rbdwp81r0000gn/T/ruby-build.20241123200520.32443.log 이렇게 오류가 발생합니다. 선생님. 2.7.6을 다운로드 했는데 deprecated 됐다고 나오고, 그래서 이 버전으로도 해봤는데 안 되더라구요... 거의 몇시간을 찾는데 관련 글도 안 나옵니다 ㅜㅜ