인프런 커뮤니티 질문&답변

lfrance님의 프로필 이미지
lfrance

작성한 질문수

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

Vercel에 그랩마켓 웹 배포하기

도와주세요 ㅜㅜ vercel 과 git 연동 및 배포 완료했는데 베너 이중화 및 최신 기능이 미반영

작성

·

1.7K

2

8 minutes ago
8 minutes ago.
 
상기 처럼 git 최신 업그레이드 했는데 react-app 폴더를 클릭해도
더이상 폴더 내용으로 들어가지 않고 먹통과 같습니다.
 
그래서 그런지 vercel 사이트에서 연동 및 배포 완료해서 축하 한다는
이벤트까지 진행 되었는데 visit 클릭하여 서버 확인 하면
2개 베너로 3초 뒤에 번갈아가면 변화는 화면이나 상품 소진시 투명색
반영 등 최신 기능으로 적용 되지 않고 예전 단순 local 기능으로만
작동 합니다. 문제가 뭔지 모르겠습니다.
 
client 말고 server(heroku 클라우드에서)는 json 형태로 잘 나옵니다.
 

redeploy 할때 build command 항목에 CI=false npm run build 입력하고 override 활성화 하고 redeploy 했는데 아래 와 같이 애러가 발생 합니다.

Cloning github.com/lfrance7/kwon-maket-client (Branch: main, Commit: 5a67156)

15:32:06.691  Warning: Failed to fetch one or more git submodules

15:32:06.691  Cloning completed: 752.593ms

15:32:06.728  Analyzing source code...15:32:07.936  Installing build runtime...

15:32:10.704  Build runtime installed: 2.768s15:32:14.228  No Build Cache available

15:32:15.769  npm ERR! code ENOENT15:32:15.769  npm ERR! syscall open

15:32:15.769  npm ERR! path /vercel/path0/package.json

15:32:15.769  npm ERR! errno -2

15:32:15.772  npm ERR! enoent ENOENT: no such file or directory, open '/vercel/path0/package.json'

15:32:15.772  npm ERR! enoent This is related to npm not being able to find a file.

15:32:15.772  npm ERR! enoent

15:32:15.779  npm ERR! A complete log of this run can be found in:

15:32:15.779  npm ERR! /vercel/.npm/_logs/2021-10-25T06_32_15_772Z-debug.log

15:32:15.794  Error: Command "CI=false npm run build" exited with 254

답변 5

1

lfrance님의 프로필 이미지
lfrance
질문자

혹시 기존 react-app 삭제하고 나서  버젼을 낮은 걸로 새로 셋팅 하면 괜찮을 까요 ? 

그랩님의 프로필 이미지
그랩
지식공유자

새로운 커밋을 만들어서 push를 하더라도 기존 사항이 업데이트되지 않는다는 말씀이시죠? 

package.json 파일을 한번 보여주시겠어요~?

1

lfrance님의 프로필 이미지
lfrance
질문자

server 로 클라우드에 올린 heroku는 잘 동작하는데 vercel에서 client 부분에서 에러가 납니다. ㅜㅜ 강의 해주신 CI = false npm run build 입력 했는데 에러가 나서 ㅜㅜ 재확인 부탁 드립니다.

0

lfrance님의 프로필 이미지
lfrance
질문자

[최종에러 내용입니다]

13:54:02.601

 

Cloning github.com/lfrance7/k-market-client (Branch: main, Commit: f345f6a)

13:54:03.580 Cloning completed: 979.335ms
13:54:03.609 Analyzing source code...
13:54:04.809 Installing build runtime...
13:54:06.907 Build runtime installed: 2.097s
13:54:09.570 No Build Cache available
13:54:10.844 Detected package.json
13:54:10.844 Installing dependencies...
13:54:12.452 npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
13:54:16.627 npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
13:54:17.325 npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
13:54:18.480 npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
13:54:20.137 npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
13:54:20.617 npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
13:54:20.745 npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
13:54:20.890 npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
13:54:20.976 npm WARN deprecated rollup-plugin-babel@4.4.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
13:54:21.818 npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
13:54:22.802 npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
13:54:22.834 npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
13:54:23.405 npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
13:54:23.406 npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
13:54:23.406 npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
13:54:23.418 npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
13:54:24.412 npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
13:54:25.576 npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
13:54:56.730  
13:54:56.730 > core-js@2.6.12 postinstall /vercel/path0/node_modules/babel-runtime/node_modules/core-js
13:54:56.730 > node -e "try{require('./postinstall')}catch(e){}"
13:54:56.731  
13:54:56.854  
13:54:56.855 > core-js@3.19.1 postinstall /vercel/path0/node_modules/core-js
13:54:56.855 > node -e "try{require('./postinstall')}catch(e){}"
13:54:56.855  
13:54:56.945  
13:54:56.945 > core-js-pure@3.19.1 postinstall /vercel/path0/node_modules/core-js-pure
13:54:56.945 > node -e "try{require('./postinstall')}catch(e){}"
13:54:56.945  
13:54:57.061  
13:54:57.061 > ejs@2.7.4 postinstall /vercel/path0/node_modules/ejs
13:54:57.061 > node ./postinstall.js
13:54:57.061  
13:54:59.104 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.1.3 (node_modules/react-scripts/node_modules/fsevents):
13:54:59.104 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
13:54:59.113 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
13:54:59.113 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
13:54:59.125 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
13:54:59.125 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
13:54:59.135 npm WARN @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.16.0 requires a peer of @babel/core@^7.13.0 but none is installed. You must install peer dependencies yourself.
13:54:59.150 npm WARN tsutils@3.21.0 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
13:54:59.151  
13:54:59.157 added 1899 packages from 747 contributors in 47.752s
13:55:00.177  
13:55:00.178 153 packages are looking for funding
13:55:00.178 run `npm fund` for details
13:55:00.178  
13:55:00.735  
13:55:00.735 > react-app@0.1.0 build /vercel/path0
13:55:00.735 > react-scripts build
13:55:00.735  
13:55:02.406 Creating an optimized production build...
13:55:03.238 Failed to compile.
13:55:03.239  
13:55:03.239 ./src/index.js
13:55:03.239 Cannot find module: 'react-router-dom'. Make sure this package is installed.
13:55:03.239  
13:55:03.239 You can install this package by running: npm install react-router-dom.
13:55:03.239  
13:55:03.240  
13:55:03.253 npm ERR! code ELIFECYCLE
13:55:03.253 npm ERR! errno 1
13:55:03.258 npm ERR! react-app@0.1.0 build: `react-scripts build`
13:55:03.259 npm ERR! Exit status 1
13:55:03.259 npm ERR!
13:55:03.259 npm ERR! Failed at the react-app@0.1.0 build script.
13:55:03.259 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
13:55:03.275  
13:55:03.275 npm ERR! A complete log of this run can be found in:
13:55:03.275 npm ERR! /vercel/.npm/_logs/2021-11-04T04_55_03_259Z-debug.log
13:55:03.295 Error: Command "CI=false npm run build" exited with 1

0

lfrance님의 프로필 이미지
lfrance
질문자

몇일을 고민하고 다양한 방법으로 에러 수정을 해 봐도 안됩니다. ㅜㅜ 이렇게 도와 주셔서 감사합니다.

우선 client git 연동은 해결 되었습니다. 남은 것은 vercel deploy 연동이 안됩니다. ㅜㅜ

최종 제 작업 폴더 밑에 총 2가지 package.json 파일이 있어서 구분하여 회신 드립니다.

root 폴더에 있는 package.json 파일 입니다.

{
"name": "react-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@ant-design/icons": "^4.7.0",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"dayjs": "^1.10.7",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^5.3.0",
"react-scripts": "4.0.3",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

/src/package.json 파일 내용입니다.

{
"name": "src",
"version": "1.0.0",
"dependencies": {
}
}

 

 

 

 

 

0

그랩님의 프로필 이미지
그랩
지식공유자

음 현재 문제 로그만 봤을 때 따로 제가 도움을 드리기는 힘들 것 같습니다 😭

히로쿠 사용하시는 분들 중 대부분 이슈 해결은 히로쿠 앱을 지우고 다시 설정했을 때 됐다는 경우가 많았어서 한번 새로 시도해보시겠어요?

lfrance님의 프로필 이미지
lfrance

작성한 질문수

질문하기