Notice
Recent Posts
Recent Comments
Link
«   2024/10   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Archives
Today
Total
관리 메뉴

한바다

[배포]npm run build 본문

카테고리 없음

[배포]npm run build

한바다진화 2024. 8. 30. 16:59

☑️ 금일은 자바와 리액트를 합쳐주는 작업을 진행하였다!

 

우선 npm run build가 무엇인지 알아본다

: npm run build는 애플리케이션을 배포할 준비가 된 최적화된 상태로 패키징하는 명령어이다.

  이 과정에서 코드 압축, 모듈 번들링, 환경 설정 등을 통해 최종적으로 배포 가능한 파일을 생성하여

  개발 중인 소스 코드를 실제 서비스에 적합한 형태로 변환한다.

 

 

✔️ 리액트에 npm run build 실행 시킨다. 성공시 build파일이 생성된다

자바 - gradlew build

리액트 - npm run build

- build 라는 파일을 타서 jar 파일을 생성 react도 합쳐서 jar로 실행할 수 있도록 만들어줘야 함

 

[에러상황]

npm run build 작성시 아래와 같은 에러가 발생하였다!

npm error
npm error To see a list of scripts, run:
npm error   npm run

npm error A complete log of this run can be found in: C:\Users\user1\AppData\Local\npm-cache\_logs\2024-08-30T01_37_57_927Z-debug-0.log
PS C:\Users\user1\realFinal\RealFinal\final\sixsence-front> npm run build
npm error Missing script: "build"
npm error
npm error To see a list of scripts, run:
npm error   npm run

npm error A complete log of this run can be found in: C:\Users\user1\AppData\Local\npm-cache\_logs\2024-08-30T01_38_31_822Z-debug-0.log

 

▶ 위 에러는 build script 가 없어서 발생한 오류로 아래와 같이 packge.json "scripts" 영역에 script를 추가 해주었다!

"scripts": {
  
    "build" : "react-scripts build"
}

위 스크립트를 추가해주니 npm run build가 성공적으로 설치되었다!

리액트에 npm run build가 성공적으로 설치 되었으니 이제 아래와 같이 폴더를 수정해 준다

 

▶ 프론트앤드 경로(deploy-java-react >ma-app) 1번에 있는 build를 백앤드 경로 deploy-java-react>demo-full>

     src>main 으로 가서 살포시 놓아준다! 즉 자바파일 안에 위에서 npm runt build 과정을 거쳐 메이킹한

     build파일을 냅둔 것이다!!

▶ 그리고 나서 build폴더를 'frontend'로 이름을 변경해준다

▶그리고 백앤드 실행을 꺼준 후 build.gradled파일에 아래 내용을 붙여 넣어준다!

plugins {
	id 'java'
	id 'org.springframework.boot' version '3.3.3'
	id 'io.spring.dependency-management' version '1.1.6'
}

group = 'com.example'
version = '0.0.1-SNAPSHOT'

java {
	toolchain {
		languageVersion = JavaLanguageVersion.of(17)
	}
}

repositories {
	mavenCentral()
}

dependencies {
	implementation 'org.springframework.boot:spring-boot-starter'
	implementation 'org.springframework.boot:spring-boot-starter-web'
	testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

tasks.named('test') {
	useJUnitPlatform()
}

def reactBuildDir = "$projectDir/src/main/front-end/build"

sourceSets {
	main {
		resources {
			srcDirs = ["$projectDir/src/main/resources"]
		}
	}
}

task copyReactFiles(type: Copy) {
	from "$reactBuildDir"
	into "$buildDir/resources/main/static"
}

processResources {
	dependsOn copyReactFiles
}

 

자바 - gradlew build 에서 buil라는 파일을 타서 jar 파일을 생성하는데. 위 gradle.build에 붙여넣은 코드들을 통해

react도 합쳐서 jar로 실행할 수 있도록 만들어 주는 것이다!

 

그리고 build.gradle이 있는 곳의 경로에서 cmd를 입력한다!

 

그리고 cmd창에서 아래 화면과 같이 gradlew build를 입력하고 BUILD SUCCESSFUL이 나와야 한다!

 

- 그런데 실패가 뜬다면 my-app(프론트앱)에서 package.json을 복사해서 백엔드경로 frontend로 가서 붙여 넣어준다!

 

[앞보다 코드가 가볍게 진행하는 경우]

<build.gradle코드>

def reactAppDir = "$projectDir/src/main/frontend"

sourceSets {
	main {
		resources {
			srcDirs = ["$projectDir/src/main/resources"]
		}
	}
}

processResources {
	dependsOn "copyReactFile"
}

task installReact(type: Exec) {
	workingDir "$reactAppDir"
	inputs.dir "$reactAppDir"
	group = BasePlugin.BUILD_GROUP
	if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
		commandLine "npm.cmd", "audit", "fix"
		commandLine 'npm.cmd', 'install'
	} else {
		commandLine "npm", "audit", "fix"
		commandLine 'npm', 'install'
	}
}

task buildReact(type: Exec) {
	dependsOn "installReact"
	workingDir "$reactAppDir"
	inputs.dir "$reactAppDir"
	group = BasePlugin.BUILD_GROUP
	if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
		commandLine "npm.cmd", "run-script", "build"
	} else {
		commandLine "npm", "run-script", "build"
	}
}

task copyReactFile(type: Copy) {
	dependsOn "buildReact"
	from "$reactAppDir/build"
	into "$buildDir/resources/main/static"
}

 

build폴더가 있는 곳에서 public,src,package.json을 복사해서  프론트 쪽에 붙어넣어준다!

백앤드 경로에 폴더를 생성해준 후 프론트앤드에 있는 public, src, package.json을 추가 해준다.

▶1번은 백앤드 경로 ~src>main에서 새폴더(my-app-two)생성해서  프론트경로2번의 public,src,package.json을 복사해서

새폴더에 붙여 넣어준다

▶옮긴 폴더에서 demo-ful-2로 가주면  build.gradle있는 쪽으로 이동한다. 그곳에서 cmd해준다!

▶cmd 창에서 gradlew build 입력한다! -> 성공이 뜨면 -> cd build -> cd libs ->  java -jar (tab키) 그리고 엔터 친다!

 

(유사한 경우)

 

▶ 3번에서 2번 build폴더를 가져온 후 1번  주소창에 cmd를 입력한다!

그리고 cmd창에 gradlew build를 입력한 후 BUILD SUCCESSFUL이 나오면

cd build 입력 후 cd libs 입력하여 java -jar (탭)키 입력하여 아래와 같이 작성한다.

C:\Users\user1\Desktop\deploy-java-react\demo-full-2>gradlew build

> Task :installReact

up to date, audited 1470 packages in 2s

261 packages are looking for funding
  run `npm fund` for details

8 vulnerabilities (2 moderate, 6 high)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

> Task :buildReact

> my-app-two@0.1.0 build
> react-scripts build

Creating an optimized production build...
Compiled with warnings.

[eslint]
src\App.js
  Line 1:8:  'Reacte' is defined but never used  no-unused-vars
  Line 3:8:  'logo' is defined but never used    no-unused-vars

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

File sizes after gzip:

  59.61 kB  build\static\js\main.80c242ac.js
  1.77 kB   build\static\js\453.c552d358.chunk.js
  513 B     build\static\css\main.f855e6bc.css

The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.
You may serve it with a static server:

  npm install -g serve
  serve -s build

Find out more about deployment here:

  https://cra.link/deployment


BUILD SUCCESSFUL in 8s
10 actionable tasks: 2 executed, 8 up-to-date
C:\Users\user1\Desktop\deploy-java-react\demo-full-2>cd build

C:\Users\user1\Desktop\deploy-java-react\demo-full-2\build>cd libs

C:\Users\user1\Desktop\deploy-java-react\demo-full-2\build\libs>java -jar demo-full-2-0.0.1-SNAPSHOT.jar

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::                (v3.3.3)

2024-08-30T11:48:26.709+09:00  INFO 11756 --- [           main] com.example.demo.DemoFull2Application    : Starting DemoFull2Application v0.0.1-SNAPSHOT using Java 17.0.12 with PID 11756 (C:\Users\user1\Desktop\deploy-java-react\demo-full-2\build\libs\demo-full-2-0.0.1-SNAPSHOT.jar started by user1 in C:\Users\user1\Desktop\deploy-java-react\demo-full-2\build\libs)
2024-08-30T11:48:26.711+09:00  INFO 11756 --- [           main] com.example.demo.DemoFull2Application    : No active profile set, falling back to 1 default profile: "default"
2024-08-30T11:48:27.303+09:00  INFO 11756 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port 8082 (http)
2024-08-30T11:48:27.313+09:00  INFO 11756 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2024-08-30T11:48:27.313+09:00  INFO 11756 --- [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.28]
2024-08-30T11:48:27.343+09:00  INFO 11756 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2024-08-30T11:48:27.344+09:00  INFO 11756 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 604 ms
2024-08-30T11:48:27.431+09:00  INFO 11756 --- [           main] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page: class path resource [static/index.html]
2024-08-30T11:48:27.574+09:00  INFO 11756 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port 8082 (http) with context path '/'
2024-08-30T11:48:27.586+09:00  INFO 11756 --- [           main] com.example.demo.DemoFull2Application    : Started DemoFull2Application in 1.099 seconds (process running for 1.381)
2024-08-30T11:48:44.776+09:00  INFO 11756 --- [nio-8082-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-08-30T11:48:44.777+09:00  INFO 11756 --- [nio-8082-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2024-08-30T11:48:44.780+09:00  INFO 11756 --- [nio-8082-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 1 ms

 

▶ 위와 같이 진행되면 성공이다.

여기서 에러가 발생할 수 있는 요소를 제거하는 것을 정리해 본다

위 이미지에서처럼 build gradle에 sixsence-front와 폴더 경로에서 프론트명이 동일해야 하며 프론트 쪽에 리액트

pulic,src,package.json파일을 넣어준다!!

그리고 build폴더가 있는 곳 1번 경로에서 cmd를 입력하고 아래의 명령어를 입력하여 완성하였다!!

[포트 에러]

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2024-08-30T16:45:07.621+09:00 ERROR 6476 --- [Sixsence] [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

 

위 오류일 경우 이클립스에서 정지를 눌러준다!! 포트를 중지해준후 실행시 아래와 같이 성공하였다!!

Microsoft Windows [Version 10.0.19045.4780]
(c) Microsoft Corporation. All rights reserved.

C:\Users\user1\realFinal\RealFinal\final\Sixsence>gradlew build

> Task :installReact
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
npm warn deprecated @babel/plugin-proposal-numeric-separator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
npm warn deprecated @babel/plugin-proposal-nullish-coalescing-operator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
npm warn deprecated @babel/plugin-proposal-private-methods@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead.
npm warn deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm warn deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm warn deprecated @babel/plugin-proposal-private-property-in-object@7.21.11: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead.
npm warn deprecated @babel/plugin-proposal-optional-chaining@7.21.0: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
npm warn deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
npm warn deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated domexception@2.0.1: Use your platform's native DOMException instead
npm warn deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm warn deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm warn deprecated workbox-cacheable-response@6.6.0: workbox-background-sync@6.6.0
npm warn deprecated workbox-google-analytics@6.6.0: It is not compatible with newer versions of GA starting with v4, as long as you are using GAv3 it should be ok, but the package is not longer being maintained
npm warn deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.

added 1767 packages, and audited 1768 packages in 53s

275 packages are looking for funding
  run `npm fund` for details

8 vulnerabilities (2 moderate, 6 high)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

> Task :buildReact

> sixsence-front@0.1.0 build
> react-scripts build

Creating an optimized production build...
Compiled with warnings.

[eslint]
src\App.js
  Line 69:9:  'isAdmin' is assigned a value but never used  no-unused-vars

src\board\AdminObo.js
  Line 18:6:  React Hook useEffect has a missing dependency: 'oboData'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

src\board\BoardNavBar.js
  Line 8:11:  'loginMember' is assigned a value but never used  no-unused-vars
  Line 13:9:  'navigate' is assigned a value but never used     no-unused-vars

src\board\CustomerPromise.js
  Line 1:17:  'useState' is defined but never used  no-unused-vars

src\board\NoticeView.js
  Line 33:27:  img elements must have an alt prop, either with meaningful text, or an empty string for decorative images  jsx-a11y/alt-text

src\hooks\useCart.js
  Line 33:8:  React Hook useEffect has a missing dependency: 'fetchCartItems'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

src\hooks\useItemPayment.js
  Line 1:31:  'useContext' is defined but never used  no-unused-vars
  Line 2:8:   'axios' is defined but never used       no-unused-vars

src\login\GoogleSignUp.js
  Line 26:50:   Unnecessary escape character: \[            no-useless-escape
  Line 26:67:   Unnecessary escape character: \/            no-useless-escape
  Line 26:97:   Unnecessary escape character: \[            no-useless-escape
  Line 26:114:  Unnecessary escape character: \/            no-useless-escape
  Line 34:34:   Expected '===' and instead saw '=='         eqeqeq
  Line 107:18:  'month' is assigned a value but never used  no-unused-vars
  Line 107:25:  'day' is assigned a value but never used    no-unused-vars

src\login\LoginContext.js
  Line 1:8:  'React' is defined but never used  no-unused-vars

src\login\MemberIdFind.js
  Line 14:47:  Unnecessary escape character: \-  no-useless-escape

src\login\MemberPwChange.js
  Line 1:10:    'useNavigate' is defined but never used  no-unused-vars
  Line 13:50:   Unnecessary escape character: \[         no-useless-escape
  Line 13:67:   Unnecessary escape character: \/         no-useless-escape
  Line 13:97:   Unnecessary escape character: \[         no-useless-escape
  Line 13:114:  Unnecessary escape character: \/         no-useless-escape
  Line 29:21:   Expected '===' and instead saw '=='      eqeqeq

src\login\MemberPwFind.js
  Line 41:7:  'isDateValid' is assigned a value but never used  no-unused-vars

src\login\MemberSignUp.js
  Line 22:50:   Unnecessary escape character: \[            no-useless-escape
  Line 22:67:   Unnecessary escape character: \/            no-useless-escape
  Line 22:97:   Unnecessary escape character: \[            no-useless-escape
  Line 22:114:  Unnecessary escape character: \/            no-useless-escape
  Line 23:47:   Unnecessary escape character: \-            no-useless-escape
  Line 118:18:  'month' is assigned a value but never used  no-unused-vars
  Line 118:25:  'day' is assigned a value but never used    no-unused-vars
  Line 218:38:  Expected '===' and instead saw '=='         eqeqeq

src\login\RegisterCheck.js
  Line 15:47:  Unnecessary escape character: \-  no-useless-escape

src\moviechart\Movieboard-app\Booking.js
  Line 18:10:  'numPeople' is assigned a value but never used              no-unused-vars
  Line 24:10:  'totalPoints' is assigned a value but never used            no-unused-vars
  Line 24:23:  'setTotalPoints' is assigned a value but never used         no-unused-vars
  Line 27:10:  'userPoints' is assigned a value but never used             no-unused-vars
  Line 58:9:   'formatDate' is assigned a value but never used             no-unused-vars
  Line 68:9:   'handleLogin' is assigned a value but never used            no-unused-vars
  Line 164:9:  'handleNumPeopleChange' is assigned a value but never used  no-unused-vars

src\moviechart\toss\PaymentCheckoutPage.js
  Line 15:36:   'adultTickets' is assigned a value but never used       no-unused-vars
  Line 15:50:   'childTickets' is assigned a value but never used       no-unused-vars
  Line 15:122:  'movieID' is assigned a value but never used            no-unused-vars
  Line 15:131:  'memberNo' is assigned a value but never used           no-unused-vars
  Line 15:141:  'usePoints' is assigned a value but never used          no-unused-vars
  Line 15:152:  'accumulatedPoints' is assigned a value but never used  no-unused-vars
  Line 15:171:  'movieNo' is assigned a value but never used            no-unused-vars
  Line 15:180:  'movieTitle' is assigned a value but never used         no-unused-vars
  Line 62:13:   'response' is assigned a value but never used           no-unused-vars

src\mypage\MypageBought.js
  Line 40:6:  React Hook useEffect has missing dependencies: 'getItempayList' and 'getboughtList'. Either include them or remove the dependency array  react-hooks/exhaustive-deps

src\mypage\MypageDeleteAccount.js
  Line 18:10:  'loginMember' is assigned a value but never used  no-unused-vars

src\mypage\MypageEditMember.js
  Line 1:17:   'useContext' is defined but never used                                                                                no-unused-vars
  Line 23:28:  Unnecessary escape character: \[                                                                                      no-useless-escape
  Line 23:45:  Unnecessary escape character: \/                                                                                      no-useless-escape
  Line 23:75:  Unnecessary escape character: \[                                                                                      no-useless-escape
  Line 23:92:  Unnecessary escape character: \/                                                                                      no-useless-escape
  Line 82:6:   React Hook useEffect has a missing dependency: 'handleUpdatePw1'. Either include it or remove the dependency array    react-hooks/exhaustive-deps
  Line 86:6:   React Hook useEffect has a missing dependency: 'handleUpdatePw2'. Either include it or remove the dependency array    react-hooks/exhaustive-deps
  Line 126:6:  React Hook useEffect has a missing dependency: 'handleUpdatePhone'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

src\mypage\MypageModal.js
  Line 7:5:  Expected a default case  default-case

src\mypage\MypageObo.js
  Line 25:6:  React Hook useEffect has a missing dependency: 'getOboList'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

src\mypage\MypageRefund.js
  Line 20:6:  React Hook useEffect has missing dependencies: 'getRefundItempayList' and 'getRefundMovieList'. Either include them or remove the dependency array  react-hooks/exhaustive-deps

src\mypage\MypageReservation.js
  Line 37:6:  React Hook useEffect has a missing dependency: 'getReservationList'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

src\store\Cart.js
  Line 1:17:  'useEffect' is defined but never used  no-unused-vars

src\store\ItemNavigationBar.js
  Line 12:12:  'itemCount' is assigned a value but never used  no-unused-vars

src\store\ItemPaymentComplete.js
  Line 2:8:    'ItemNavigationBar' is defined but never used                                                                                                                               no-unused-vars
  Line 6:8:    'useCart' is defined but never used                                                                                                                                         no-unused-vars
  Line 13:11:  'navigate' is assigned a value but never used                                                                                                                               no-unused-vars
  Line 27:7:   React Hook useEffect has missing dependencies: 'loginMember', 'memberPointUpdate', and 'paymentInfo.itempay_point_use'. Either include them or remove the dependency array  react-hooks/exhaustive-deps
  Line 32:8:   React Hook useEffect has a missing dependency: 'deleteCartItem'. Either include it or remove the dependency array                                                           react-hooks/exhaustive-deps
  Line 41:8:   React Hook useEffect has a missing dependency: 'addPaymentInfo'. Either include it or remove the dependency array                                                           react-hooks/exhaustive-deps

src\store\ItemPurchase.js
  Line 3:8:     'axios' is defined but never used                                                                          no-unused-vars
  Line 6:8:     'useItemPayment' is defined but never used                                                                 no-unused-vars
  Line 132:26:  Expected '===' and instead saw '=='                                                                        eqeqeq
  Line 183:37:  img elements must have an alt prop, either with meaningful text, or an empty string for decorative images  jsx-a11y/alt-text

src\store\payment\ItemPaymentCheckoutPage.js
  Line 5:8:  'axios' is defined but never used  no-unused-vars

src\store\payment\ItemPaymentSuccessPage.js
  Line 1:33:   'useRef' is defined but never used                                                                                                                           no-unused-vars
  Line 15:9:   'location' is assigned a value but never used                                                                                                                no-unused-vars
  Line 19:10:  'responseData' is assigned a value but never used                                                                                                            no-unused-vars
  Line 19:24:  'setResponseData' is assigned a value but never used                                                                                                         no-unused-vars
  Line 30:20:  'confirm' is defined but never used                                                                                                                          no-unused-vars
  Line 51:11:  Expected an error object to be thrown                                                                                                                        no-throw-literal
  Line 61:6:   React Hook useEffect has a missing dependency: 'navigate'. Either include it or remove the dependency array                                                  react-hooks/exhaustive-deps
  Line 81:6:   React Hook useEffect has a missing dependency: 'deleteCartItem'. Either include it or remove the dependency array                                            react-hooks/exhaustive-deps
  Line 103:6:  React Hook useEffect has missing dependencies: 'addPaymentInfo', 'loginMember', and 'memberPointUpdate'. Either include them or remove the dependency array  react-hooks/exhaustive-deps
  Line 103:7:  React Hook useEffect has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked                     react-hooks/exhaustive-deps

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

File sizes after gzip:

  207.01 kB  build\static\js\main.15bbea21.js
  43.26 kB   build\static\css\main.9f7e5440.css
  2.98 kB    build\static\js\reactPlayerFilePlayer.ab084ef7.chunk.js
  1.94 kB    build\static\js\reactPlayerYouTube.431d1bf8.chunk.js
  1.85 kB    build\static\js\reactPlayerMux.e0a402e6.chunk.js
  1.43 kB    build\static\js\reactPlayerWistia.07710db9.chunk.js
  1.43 kB    build\static\js\reactPlayerVimeo.71a27a19.chunk.js
  1.35 kB    build\static\js\reactPlayerFacebook.38a0bf18.chunk.js
  1.34 kB    build\static\js\reactPlayerPreview.81959b5d.chunk.js
  1.31 kB    build\static\js\reactPlayerTwitch.cb0a3104.chunk.js
  1.29 kB    build\static\js\reactPlayerDailyMotion.422a4bd7.chunk.js
  1.28 kB    build\static\js\reactPlayerSoundCloud.0b1eef73.chunk.js
  1.26 kB    build\static\js\reactPlayerStreamable.68767ee1.chunk.js
  1.24 kB    build\static\js\reactPlayerVidyard.ff38ba70.chunk.js
  1.24 kB    build\static\js\reactPlayerKaltura.901def88.chunk.js
  1.19 kB    build\static\js\reactPlayerMixcloud.041f50ec.chunk.js

The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.
You may serve it with a static server:

  npm install -g serve
  serve -s build

Find out more about deployment here:

  https://cra.link/deployment


BUILD SUCCESSFUL in 1m 13s
8 actionable tasks: 7 executed, 1 up-to-date
C:\Users\user1\realFinal\RealFinal\final\Sixsence>cd build

C:\Users\user1\realFinal\RealFinal\final\Sixsence\build>cd libs

C:\Users\user1\realFinal\RealFinal\final\Sixsence\build\libs>java -jar Sixsence-0.0.1-SNAPSHOT.jar

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::                (v3.3.3)

2024-08-30T16:45:05.215+09:00  INFO 6476 --- [Sixsence] [           main] com.six.SixsenceApplication              : Starting SixsenceApplication v0.0.1-SNAPSHOT using Java 17.0.12 with PID 6476 (C:\Users\user1\realFinal\RealFinal\final\Sixsence\build\libs\Sixsence-0.0.1-SNAPSHOT.jar started by user1 in C:\Users\user1\realFinal\RealFinal\final\Sixsence\build\libs)
2024-08-30T16:45:05.218+09:00  INFO 6476 --- [Sixsence] [           main] com.six.SixsenceApplication              : No active profile set, falling back to 1 default profile: "default"
2024-08-30T16:45:05.648+09:00  INFO 6476 --- [Sixsence] [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2024-08-30T16:45:05.661+09:00  INFO 6476 --- [Sixsence] [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 5 ms. Found 0 JPA repository interfaces.
2024-08-30T16:45:06.062+09:00  INFO 6476 --- [Sixsence] [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port 666 (http)
2024-08-30T16:45:06.076+09:00  INFO 6476 --- [Sixsence] [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2024-08-30T16:45:06.076+09:00  INFO 6476 --- [Sixsence] [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.28]
2024-08-30T16:45:06.111+09:00  INFO 6476 --- [Sixsence] [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2024-08-30T16:45:06.112+09:00  INFO 6476 --- [Sixsence] [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 862 ms
2024-08-30T16:45:06.169+09:00  INFO 6476 --- [Sixsence] [           main] com.zaxxer.hikari.HikariDataSource       : MyHikariCP - Starting...
2024-08-30T16:45:06.351+09:00  INFO 6476 --- [Sixsence] [           main] com.zaxxer.hikari.pool.HikariPool        : MyHikariCP - Added connection com.mysql.cj.jdbc.ConnectionImpl@6ee5f485
2024-08-30T16:45:06.355+09:00  INFO 6476 --- [Sixsence] [           main] com.zaxxer.hikari.HikariDataSource       : MyHikariCP - Start completed.
2024-08-30T16:45:06.429+09:00  INFO 6476 --- [Sixsence] [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
2024-08-30T16:45:06.466+09:00  INFO 6476 --- [Sixsence] [           main] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 6.5.2.Final
2024-08-30T16:45:06.491+09:00  INFO 6476 --- [Sixsence] [           main] o.h.c.internal.RegionFactoryInitiator    : HHH000026: Second-level cache disabled
2024-08-30T16:45:06.705+09:00  INFO 6476 --- [Sixsence] [           main] o.s.o.j.p.SpringPersistenceUnitInfo      : No LoadTimeWeaver setup: ignoring JPA class transformer
2024-08-30T16:45:07.026+09:00  INFO 6476 --- [Sixsence] [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
2024-08-30T16:45:07.030+09:00  INFO 6476 --- [Sixsence] [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2024-08-30T16:45:07.321+09:00  WARN 6476 --- [Sixsence] [           main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2024-08-30T16:45:07.339+09:00  INFO 6476 --- [Sixsence] [           main] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page: class path resource [static/index.html]
2024-08-30T16:45:07.508+09:00  WARN 6476 --- [Sixsence] [           main] ion$DefaultTemplateResolverConfiguration : Cannot find template location: classpath:/templates/ (please add some templates, check your Thymeleaf configuration, or set spring.thymeleaf.check-template-location=false)
2024-08-30T16:45:07.589+09:00  WARN 6476 --- [Sixsence] [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'
2024-08-30T16:45:07.591+09:00  INFO 6476 --- [Sixsence] [           main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2024-08-30T16:45:07.592+09:00  INFO 6476 --- [Sixsence] [           main] com.zaxxer.hikari.HikariDataSource       : MyHikariCP - Shutdown initiated...
2024-08-30T16:45:07.602+09:00  INFO 6476 --- [Sixsence] [           main] com.zaxxer.hikari.HikariDataSource       : MyHikariCP - Shutdown completed.
2024-08-30T16:45:07.610+09:00  INFO 6476 --- [Sixsence] [           main] .s.b.a.l.ConditionEvaluationReportLogger :

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2024-08-30T16:45:07.621+09:00 ERROR 6476 --- [Sixsence] [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

Web server failed to start. Port 666 was already in use.

Action:

Identify and stop the process that's listening on port 666 or configure this application to listen on another port.


C:\Users\user1\realFinal\RealFinal\final\Sixsence\build\libs>java -jar Sixsence-0.0.1-SNAPSHOT.jar

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::                (v3.3.3)

2024-08-30T16:45:40.843+09:00  INFO 17808 --- [Sixsence] [           main] com.six.SixsenceApplication              : Starting SixsenceApplication v0.0.1-SNAPSHOT using Java 17.0.12 with PID 17808 (C:\Users\user1\realFinal\RealFinal\final\Sixsence\build\libs\Sixsence-0.0.1-SNAPSHOT.jar started by user1 in C:\Users\user1\realFinal\RealFinal\final\Sixsence\build\libs)
2024-08-30T16:45:40.845+09:00  INFO 17808 --- [Sixsence] [           main] com.six.SixsenceApplication              : No active profile set, falling back to 1 default profile: "default"
2024-08-30T16:45:41.299+09:00  INFO 17808 --- [Sixsence] [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2024-08-30T16:45:41.312+09:00  INFO 17808 --- [Sixsence] [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 5 ms. Found 0 JPA repository interfaces.
2024-08-30T16:45:41.687+09:00  INFO 17808 --- [Sixsence] [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port 666 (http)
2024-08-30T16:45:41.697+09:00  INFO 17808 --- [Sixsence] [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2024-08-30T16:45:41.697+09:00  INFO 17808 --- [Sixsence] [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.28]
2024-08-30T16:45:41.728+09:00  INFO 17808 --- [Sixsence] [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2024-08-30T16:45:41.728+09:00  INFO 17808 --- [Sixsence] [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 851 ms
2024-08-30T16:45:41.782+09:00  INFO 17808 --- [Sixsence] [           main] com.zaxxer.hikari.HikariDataSource       : MyHikariCP - Starting...
2024-08-30T16:45:41.972+09:00  INFO 17808 --- [Sixsence] [           main] com.zaxxer.hikari.pool.HikariPool        : MyHikariCP - Added connection com.mysql.cj.jdbc.ConnectionImpl@4f1fb828
2024-08-30T16:45:41.973+09:00  INFO 17808 --- [Sixsence] [           main] com.zaxxer.hikari.HikariDataSource       : MyHikariCP - Start completed.
2024-08-30T16:45:42.037+09:00  INFO 17808 --- [Sixsence] [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
2024-08-30T16:45:42.077+09:00  INFO 17808 --- [Sixsence] [           main] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 6.5.2.Final
2024-08-30T16:45:42.100+09:00  INFO 17808 --- [Sixsence] [           main] o.h.c.internal.RegionFactoryInitiator    : HHH000026: Second-level cache disabled
2024-08-30T16:45:42.335+09:00  INFO 17808 --- [Sixsence] [           main] o.s.o.j.p.SpringPersistenceUnitInfo      : No LoadTimeWeaver setup: ignoring JPA class transformer
2024-08-30T16:45:42.602+09:00  INFO 17808 --- [Sixsence] [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
2024-08-30T16:45:42.606+09:00  INFO 17808 --- [Sixsence] [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2024-08-30T16:45:42.875+09:00  WARN 17808 --- [Sixsence] [           main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2024-08-30T16:45:42.894+09:00  INFO 17808 --- [Sixsence] [           main] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page: class path resource [static/index.html]
2024-08-30T16:45:43.064+09:00  WARN 17808 --- [Sixsence] [           main] ion$DefaultTemplateResolverConfiguration : Cannot find template location: classpath:/templates/ (please add some templates, check your Thymeleaf configuration, or set spring.thymeleaf.check-template-location=false)
2024-08-30T16:45:43.152+09:00  INFO 17808 --- [Sixsence] [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port 666 (http) with context path '/'
2024-08-30T16:45:43.164+09:00  INFO 17808 --- [Sixsence] [           main] com.six.SixsenceApplication              : Started SixsenceApplication in 2.582 seconds (process running for 2.876)
2024-08-30T16:46:01.994+09:00  INFO 17808 --- [Sixsence] [-nio-666-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-08-30T16:46:01.994+09:00  INFO 17808 --- [Sixsence] [-nio-666-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2024-08-30T16:46:01.996+09:00  INFO 17808 --- [Sixsence] [-nio-666-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 1 ms
2580000

 

위와 같이 성공 후 브라우저에서 localhost:666 입력시 정상적으로 실행되었다!