我在我的react-application中使用jest
进行单元测试。
最近我使用了gitlab的CI,制作一个完整的CI非常非常简单。
因此,当CI运行单元测试时,我遇到了一个错误,并且我找不到问题所在:
The name
源地图支持was looked up in the Haste module map. It cannot be resolved, because there exists several different files, or packages, that provide a module for that particular name and platform. The platform is generic (no extension). You must delete or blacklist files until there remains only one of these:
在两个点之后,它显示了导致问题的不同路径。但是我不明白...
感谢您的帮助
PS:
我的gitlab-ci.yml:
image: node:8.11.1
cache:
paths:
- node_modules/
- .yarn
before_script:
- apt-get update -qq && apt-get install
stages:
- test
- lint
- build
- openMr
Test:
stage: test
before_script:
- yarn config set cache-folder .yarn
- yarn
script:
- yarn test
Lint:
stage: lint
before_script:
- yarn config set cache-folder .yarn
- yarn
script:
- yarn lint
Build:
stage: build
before_script:
- yarn config set cache-folder .yarn
- yarn
script:
- yarn build
Open Merge Request:
image: tmaier/gitlab-auto-merge-request
stage: openMr
script:
- sudo HOST=${CI_PROJECT_URL} CI_PROJECT_ID=${CI_PROJECT_ID} CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME} GITLAB_USER_ID=${GITLAB_USER_ID} PRIVATE_TOKEN=${PRIVATE_TOKEN} ./auto-merge-request.sh