我正在为 monorepo 项目中的 web 应用程序创建管道,它也作为移动应用程序代码,在为 web 创建构建时,它无法访问 web 文件夹之外的域文件夹,所以我找不到模块运行构建命令出错
这是文件夹结构
消费者前端
-域 -移动的 -网络 -package-lock.json -bitbucket-pipelines.yml
这是管道代码
pipelines:
branches: # Branch-specific pipelines definitions
test-deploy-2:
- step:
name: Building the app
image: node:18.14.2
script:
- cd web
- npm install
- npm run build
artifacts:
- build/**
- step:
name: Deploying the app to S3
deployment: test
script:
- pipe: atlassian/aws-s3-deploy:0.2.4
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
S3_BUCKET: $S3_BUCKET
ACL: "public-read"
LOCAL_PATH: "./web/build"
这是 package.json 文件
{
"name": "WebApp",
"version": "0.1.0",
"private": true,
"dependencies": {
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@mantine/carousel": "^5.8.0",
"@mantine/hooks": "^5.9.4",
"@mui/icons-material": "^5.10.9",
"@mui/lab": "^5.0.0-alpha.113",
"@mui/material": "^5.10.13",
"@mui/x-date-pickers": "^5.0.9",
"@WebApp/domain": "file:../domain",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"@types/react-otp-input": "^2.0.1",
"@types/sortablejs": "^1.15.0",
"array-move": "^4.0.0",
"dayjs": "^1.11.7",
"embla-carousel-autoplay": "^7.0.5",
"formik": "^2.2.9",
"framer-motion": "^8.1.7",
"html-react-parser": "^3.0.4",
"html-to-text": "^9.0.3",
"html2canvas": "^1.4.1",
"moment": "^2.29.4",
"react": "^18.2.0",
"react-audio-voice-recorder": "^1.0.4",
"react-circular-progressbar": "^2.1.0",
"react-color": "^2.19.3",
"react-dom": "^18.2.0",
"react-drag-reorder": "^1.2.0",
"react-media-recorder": "^1.6.6",
"react-redux": "^8.0.5",
"react-responsive-carousel": "^3.2.23",
"react-router-dom": "^6.4.4",
"react-scripts": "5.0.1",
"react-sketch-canvas": "^6.2.0",
"react-slick": "^0.29.0",
"react-sortablejs": "^6.1.4",
"save": "^2.9.0",
"slick-carousel": "^1.8.1",
"sortablejs": "^1.15.0",
"suneditor": "^2.44.3",
"suneditor-react": "^3.4.1",
"typescript": "^4.9.4",
"web-vitals": "^2.1.4",
"workbox-background-sync": "^6.5.4",
"workbox-broadcast-update": "^6.5.4",
"workbox-cacheable-response": "^6.5.4",
"workbox-core": "^6.5.4",
"workbox-expiration": "^6.5.4",
"workbox-google-analytics": "^6.5.4",
"workbox-navigation-preload": "^6.5.4",
"workbox-precaching": "^6.5.4",
"workbox-range-requests": "^6.5.4",
"workbox-routing": "^6.5.4",
"workbox-strategies": "^6.5.4",
"workbox-streams": "^6.5.4",
"yup": "^0.32.11"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@babel/plugin-transform-block-scoping": "^7.21.0",
"@types/node": "^18.11.17",
"@types/sortablejs": "^1.15.0",
"polyfill": "^0.1.0"
}
}
我正在尝试构建项目并将工件保存在构建文件夹中,但构建步骤失败并出现错误** 未找到模块:错误:无法在“/opt/atlassian/pipelines/”中解析“@webApp/domain”代理/构建/网络/src'**