Error: Cannot find module '@vue/cli-plugin-babel/preset'当我使用 docker-compose 运行 Cypress 测试时遇到此错误。
docker-compose.yml
frontend:
container_name: VueJS
build: client
volumes:
- ./client:/app #Uncomment to directly update code in the container
- /app/node_modules
# environment:
# - CHOKIDAR_USEPOLLING=true
networks:
default:
ports:
- "8080:8080"
cypress:
container_name: Cypress
image: cypress/included:7.5.0
# entrypoint: cypress open --project /e2e
environment:
# pass base url to test pointing at the web application
- CYPRESS_baseUrl=http://frontend:8080
# share the current folder as volume to avoid copying
working_dir: /e2e
volumes:
- ./client:/e2e
# …Run Code Online (Sandbox Code Playgroud)