0
에서 환경 변수에 추가 한 후 발견되지 않은 :모카 명령을 내 모카 테스트를 실행하는 빌드 후 명령을 내 buildspec.yml 파일에서 CodeBuild
나는 패키지에서 설정 한 뭔가npm run mochatest
. JSON은 다음과 같이
"scripts": {
"mochatest": "mocha --timeout 30000 test/functional_api_crud.js"
},
CodeBuild는 실행하고 모카를 시작하고 내 Node.js를 코드에 사용되는 환경 변수가 설정되지 않았기 때문에 그때는 테스트 실패했다. 그래서, 나는 CodeBuild의 고급 설정에 들어가서 필요한 환경 변수를 추가했습니다. 이제 실행이 발생하면 모카를 찾을 수 없다는 오류가 발생합니다! 오류 라인은 다음과 같습니다.
[Container] 2017/12/28 19:24:29 Running command npm run mochatest
[email protected] mochatest /codebuild/output/src251232826/src
mocha --timeout 30000 test/functional_api_crud.js
sh: 1: mocha: not found
npm ERR! Please include the following file with any support request:
npm ERR! /codebuild/output/src251232826/src/npm-debug.log
이것은 내 자신의 환경 변수를 추가 한 후에 발생합니다! 내가 이것을했기 때문에 다른 환경 변수가 화가 났습니까?