inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

따라하며 배우는 도커와 CI환경 [2023.11 업데이트]

.travis.yml 파일 작성하기 (테스트까지)

.travis.yml 파일 작성하기 과정 중에 아무리해도 테스트가 성공이 안됩니다.

452

gonieyoo

작성한 질문수 7

0

.travis.yml 파일 작성 후에 깃 커밋하고

sudo: required

language: generic

services:
  - docker

before-install:
  - echo "start creating an image with dockerfile"
  - docker build -t gonieyoo720/docker-react-app -f Dockerfile.dev .

script:
  - docker run -e CI=true gonieyoo720/docker-react-app npm run test -- --coverage

after_success:
  - echo "Test Success"

트래비스에까지 테스트를 돌렸는데, 몇번을 수정하고 해봐도

트래비스에서 테스트를 통과하지 못하네요.

오타 확인도 많이 해봤는데, 해결을 못하고있습니다.

테스트에 중지되지않은 비동기작업이 있다고 오류를 해결하려면 devDependency를 추가하라는데, 어떻게 해야할까요

--------------------|---------|----------|---------|---------|-------------------
File                | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
--------------------|---------|----------|---------|---------|-------------------
All files           |    8.33 |        0 |   33.33 |    8.33 |                   
 App.js             |     100 |      100 |     100 |     100 |                   
 index.js           |       0 |      100 |     100 |       0 | 7-17              
 reportWebVitals.js |       0 |        0 |       0 |       0 | 1-8               
--------------------|---------|----------|---------|---------|-------------------
Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   0 total
Time:        2.06 s
Ran all test suites.
Jest did not exit one second after the test run has completed.
This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.
One of your dependencies, babel-preset-react-app, is importing the
"@babel/plugin-proposal-private-property-in-object" package without
declaring it in its dependencies. This is currently working because
"@babel/plugin-proposal-private-property-in-object" is already in your
node_modules folder for unrelated reasons, but it may break at any time.
babel-preset-react-app is part of the create-react-app project, which
is not maintianed anymore. It is thus unlikely that this bug will
ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to
your devDependencies to work around this error. This will make this message
go away.
  
The command "docker run -e CI=true gonieyoo720/docker-react-app npm run test -- --coverage" exited with 1.
Done. Your build exited with 1.

aws docker github ci/cd travis-ci 데이터-엔지니어링

답변 1

0

John Ahn

안녕하세요

테스트가 실패한걸로 보이는데 우선 로컬에서 테스트를 할때는 테스트가 통과가 되나요?

0

gonieyoo

docker-react-app-tests-1  | One of your dependencies, babel-preset-react-app, is importing the
docker-react-app-tests-1  | "@babel/plugin-proposal-private-property-in-object" package without
docker-react-app-tests-1  | declaring it in its dependencies. This is currently working because
docker-react-app-tests-1  | "@babel/plugin-proposal-private-property-in-object" is already in your
docker-react-app-tests-1  | node_modules folder for unrelated reasons, but it may break at any time.
docker-react-app-tests-1  | 
docker-react-app-tests-1  | babel-preset-react-app is part of the create-react-app project, which
docker-react-app-tests-1  | is not maintianed anymore. It is thus unlikely that this bug will
docker-react-app-tests-1  | ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to
docker-react-app-tests-1  | your devDependencies to work around this error. This will make this message
docker-react-app-tests-1  | go away.

0

gonieyoo

로컬테스트에서는 "babel-preset-react-app"이라는 패키지때문에 오류가 나오고 있습니다.

일전에 패키지가 설치되어있지않아,

npm install --save-dev @babel/plugin-proposal-private-property-in-object

터미널에서 강제로 해당 패키지를 설치했으나, 종속성 선언 문제로 오류가 계속 발생하는데, 해결방법을 모르겠습니다.

0

gonieyoo

답답한 마음에 다시 다 지우고 리액트 처음부터 설치하는 부분으로 가는데, 빌드때부터 다음의 메세지가 나오는 것으로 보아, 제 컴퓨터에서 해당 과정을 동일하게 진행했을때 문제가 발생하는 것으로 보입니다.

 

One of your dependencies, babel-preset-react-app, is importing the
"@babel/plugin-proposal-private-property-in-object" package without
declaring it in its dependencies. This is currently working because
"@babel/plugin-proposal-private-property-in-object" is already in your
node_modules folder for unrelated reasons, but it may break at any time.

babel-preset-react-app is part of the create-react-app project, which
is not maintianed anymore. It is thus unlikely that this bug will
ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to
your devDependencies to work around this error. This will make this message
go away.

Docker Containers간 통신 할 때 나타나는 에러 강의 질문

0

80

1

WINDOW + Vite를 사용하여 소스 코드 변경이 반영되지 않는 현상

0

79

1

도커 컨테이너 끼리 SSL 통신 시 문제가 생깁니다..

0

216

1

도표 강의 자료 사용이 불가합니다. (권한 문제)

0

136

1

Docker compose 관련 공유

0

142

1

트레비스가 유료화가 되어 테스트가 어려워 챕터8에서 고민중입니다.

0

79

1

강사님 혹시 vscode 어떤 테마 쓰시나요..?

0

286

1

The instance profile aws-elasticbeanstalk-ec2-role associated with the environment does not exist.

0

105

1

travis ci가 이제 유료화가 된 것 같습니다;;;

0

211

2

docker-compose up 에러 공유 드립니다

0

291

1

Elastic Beanstalk에서 도메인 클릭시 react 이미지가 안나오고 다른 화면이 나오는데

0

170

1

도커 빌드 시간이 너무 오래걸려요..

0

1062

2

docker-compose down 이후에도 containers에 redis가 남아 있는 이유

0

168

1

도커 볼륨이 작동이 안되는것 같아서 질문드립니다!

0

213

2

docker-compose 가 Docker Desktop 에서 빠진건가요? command not found 라고 뜨네요

0

279

1

Error response from daemon: The system cannot find the file specified.

0

220

1

draw.io 오류

0

650

1

Docker Volume 오류(reference, lowercase)

0

564

1

[섹션3 - 내가 만든 이미지 기억하기 쉬운 이름 주기] 네이밍/태그 에러

0

226

1

axios오류 문의드립니다!

0

334

1

node.js version

0

485

1

안녕하세요 마지막 강의 질문 있습니다.

0

435

1

Deploy를 계속 실패합니다.

3

1383

4

TravisCI에서 계속 에러가 납니다....

0

359

1