2017-12-10 1 views
0

처음부터 반응 네이티브 프로젝트를 생성 할 때 jestdevDependencies에 있고 테스트가 통과되었습니다!jest 또는 jest-cli를 처음부터 반응하는 네이티브 프로젝트에 사용해야합니까?

하지만 내 테스트를 수행 할 때 지금은 무엇입니까 :

(node:32629) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot find module '.../node_modules/jest-cli' 
(node:32629) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 

내가 농담 또는 농담-CLI를 사용해야합니까?

답변

1

추가 정보 없이는 알기 어렵지만, 전세계에 설치된 jestpackages.json 버전보다 오래되었을 수 있습니다.

결과를 프로젝트 디렉토리에서 다음을 실행 해보십시오와 비교 :

jest --version 
npm exec jest --version 

또한 로컬에 설치된 버전을 사용 농담을 실행과 npm exec jest를 실행 해보십시오.

관련 문제