본문 바로가기

Application19

[Next.js] next-auth 구글, aws 코그니토 연동 관련 next-auth를 활용하여 간편가입을 연동하고, 코그니토와 연동관련 코드 import NextAuth, { Account, User, Profile } from "next-auth"; import GoogleProvider from "next-auth/providers/google"; import AWS from "aws-sdk"; import Config from "../../../../../config/config.export"; AWS.config.update({ region: "ap-northeast-2" }); const cognito = new AWS.CognitoIdentityServiceProvider(); // JWT만료 확인. BE에서 검증으로 주석처리 // const isTokenE.. 2023. 10. 14.
[Next.js] 기동시 에러 SyntaxError: Unexpected token '??=' at wrapSafe (internal/modules/cjs/loader.js:1001:16) at Module._compile (internal/modules/cjs/loader.js:1049:27) 아래와 같은 에러 발생 시 node 버전을 확인해보자 SyntaxError: Unexpected token '??=' at wrapSafe (internal/modules/cjs/loader.js:1001:16) at Module._compile (internal/modules/cjs/loader.js:1049:27) 확인 방법 #노드 버전 확인 node -v #nvm list 를 통해 설치된 노드들을 볼 수 있음 nvm list #node 설치 nvm instll 18.16.0 #노드 버전 변경 nvm use 18.16.0 2023. 5. 27.
Next.js 초간단 시작하기 (프로젝트 생성하고 띄어보기) 1. 사전준비 Node.js 설치 2.Next.js 프로젝트 시작하기 #npx 사용 npx create-next-app@latest #app을 사용할 경우 npx create-next-app@latest --experimental-app #ts를 사용할 경우 npx create-next-app@latest --typescript #yarn 사용 yarn create next-app 3.프로젝트 기동 시키기 #dev 환경 기동 npm run dev 4.브라우저에서 접속해보기 http://localhost:3000 2023. 5. 27.
[스프링부트] intelliJ maven 에러 (not found, cache) spring boot maven 사용시 pom.xml 의 디펜던시 버전 수정 후 등 이후 메이븐 리로드시 아래와 같은 에러가 나온다. org.springframework...was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at no local POM @ line 5, column 1.. 2022. 2. 8.
[Algorithm] 타켓 넘버 ( 프로그래머스-Level2 / Python ) 문제 설명 n개의 음이 아닌 정수가 있습니다. 이 수를 적절히 더하거나 빼서 타겟 넘버를 만들려고 합니다. 예를 들어 [1, 1, 1, 1, 1]로 숫자 3을 만들려면 다음 다섯 방법을 쓸 수 있습니다. -1+1+1+1+1 = 3 +1-1+1+1+1 = 3 +1+1-1+1+1 = 3 +1+1+1-1+1 = 3 +1+1+1+1-1 = 3 사용할 수 있는 숫자가 담긴 배열 numbers, 타겟 넘버 target이 매개변수로 주어질 때 숫자를 적절히 더하고 빼서 타겟 넘버를 만드는 방법의 수를 return 하도록 solution 함수를 작성해주세요. 제한사항 주어지는 숫자의 개수는 2개 이상 20개 이하입니다. 각 숫자는 1 이상 50 이하인 자연수입니다. 타겟 넘버는 1 이상 1000 이하인 자연수입니다. .. 2021. 10. 11.
[Algorithm] 짝지어 제거하기 ( 프로그래머스-Level2 / Python ) 문제 설명 짝지어 제거하기는, 알파벳 소문자로 이루어진 문자열을 가지고 시작합니다. 먼저 문자열에서 같은 알파벳이 2개 붙어 있는 짝을 찾습니다. 그다음, 그 둘을 제거한 뒤, 앞뒤로 문자열을 이어 붙입니다. 이 과정을 반복해서 문자열을 모두 제거한다면 짝지어 제거하기가 종료됩니다. 문자열 S가 주어졌을 때, 짝지어 제거하기를 성공적으로 수행할 수 있는지 반환하는 함수를 완성해 주세요. 성공적으로 수행할 수 있으면 1을, 아닐 경우 0을 리턴해주면 됩니다. 예를 들어, 문자열 S = baabaa 라면 b aa baa → bb aa → aa → 의 순서로 문자열을 모두 제거할 수 있으므로 1을 반환합니다. 제한사항 문자열의 길이 : 1,000,000이하의 자연수 문자열은 모두 소문자로 이루어져 있습니다. .. 2021. 10. 11.