gtihub动作在NPM CI中未被推销

发布于 2025-02-07 18:31:48 字数 6855 浏览 0 评论 0原文

我有一个构建React应用程序的GitHub动作。直到今天,它运行良好,并且在NPM CI Action出乎意料地失败。它每次都可以平稳运行。当我尝试在本地运行我的应用程序时,它也可以正常运行。 以下是动作输出的错误:

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @mui/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   dev react@"^17.0.1" from the root project
npm WARN   43 more (@egoist/vue-to-react, @emotion/core, @emotion/react, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^17.0.2" from @mui/[email protected]
npm WARN node_modules/@mui/base
npm WARN   @mui/base@"5.0.0-alpha.60" from @mui/[email protected]
npm WARN   node_modules/@mui/material
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^17.0.2" from @mui/[email protected]
npm WARN   node_modules/@mui/base
npm WARN     @mui/base@"5.0.0-alpha.60" from @mui/[email protected]
npm WARN     node_modules/@mui/material
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @mui/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react-dom
npm WARN   dev react-dom@"^17.0.1" from the root project
npm WARN   14 more (@ramonak/react-progress-bar, @restart/ui, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^17.0.2" from @mui/[email protected]
npm WARN node_modules/@mui/base
npm WARN   @mui/base@"5.0.0-alpha.60" from @mui/[email protected]
npm WARN   node_modules/@mui/material
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react-dom
npm WARN   peer react-dom@"^17.0.2" from @mui/[email protected]
npm WARN   node_modules/@mui/base
npm WARN     @mui/base@"5.0.0-alpha.60" from @mui/[email protected]
npm WARN     node_modules/@mui/material
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @mui/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   dev react@"^17.0.1" from the root project
npm ERR!   peer react@"^16.8.6 || ^17" from @egoist/[email protected]
npm ERR!   node_modules/@egoist/vue-to-react
npm ERR!     @egoist/vue-to-react@"^1.1.0" from @storybook/[email protected]
npm ERR!     node_modules/@storybook/addon-docs
npm ERR!       @storybook/addon-docs@"^5.3.4" from [email protected]
npm ERR!       node_modules/symphony-bdk-ui-toolkit
npm ERR!         dev symphony-bdk-ui-toolkit@"^1.0.2-beta.0" from the root project
npm ERR!   42 more (@emotion/core, @emotion/react, @emotion/styled, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.2" from @mui/[email protected]
npm ERR! node_modules/@mui/icons-material
npm ERR!   @mui/icons-material@"^5.2.4" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR!   peer react@"^17.0.2" from @mui/[email protected]
npm ERR!   node_modules/@mui/icons-material
npm ERR!     @mui/icons-material@"^5.2.4" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/runner/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2022-06-16T02_22_34_913Z-debug-0.log
Error: Process completed with exit code 1.

这是我的github工作流程中的yaml文件:

name: Build and Push to GCP (Production)

on:
  workflow_dispatch:

env:
  GKE_PROJECT: sym-prod
  DOCKER_IMAGE: gcr.io/sym/contactApp
  DOCKER_IMAGE_TAG: JAVA-${{ github.sha }}
  SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

jobs:
  test-build-push:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Install NPM Packages
        run: npm ci

      - name: Build App
        run: |
          REACT_APP_BUILD_SHA=${{ github.sha }} \
          REACT_APP_BUILD_DATE=$(date +'%F %T %Z') \
          npm run build-for-java
      - name: Build Docker
        run: docker build -t ${{ env.DOCKER_IMAGE }} -f Dockerfile .

任何潜在客户都将不胜感激。

I have a github action which build react app. It worked fine until today and fails unexpectedly at npm ci action.It used to run smooth everytime.When I try to run my app in local it works fine as well.
Below is the error from Actions output:

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @mui/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   dev react@"^17.0.1" from the root project
npm WARN   43 more (@egoist/vue-to-react, @emotion/core, @emotion/react, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^17.0.2" from @mui/[email protected]
npm WARN node_modules/@mui/base
npm WARN   @mui/base@"5.0.0-alpha.60" from @mui/[email protected]
npm WARN   node_modules/@mui/material
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^17.0.2" from @mui/[email protected]
npm WARN   node_modules/@mui/base
npm WARN     @mui/base@"5.0.0-alpha.60" from @mui/[email protected]
npm WARN     node_modules/@mui/material
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @mui/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react-dom
npm WARN   dev react-dom@"^17.0.1" from the root project
npm WARN   14 more (@ramonak/react-progress-bar, @restart/ui, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^17.0.2" from @mui/[email protected]
npm WARN node_modules/@mui/base
npm WARN   @mui/base@"5.0.0-alpha.60" from @mui/[email protected]
npm WARN   node_modules/@mui/material
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react-dom
npm WARN   peer react-dom@"^17.0.2" from @mui/[email protected]
npm WARN   node_modules/@mui/base
npm WARN     @mui/base@"5.0.0-alpha.60" from @mui/[email protected]
npm WARN     node_modules/@mui/material
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @mui/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   dev react@"^17.0.1" from the root project
npm ERR!   peer react@"^16.8.6 || ^17" from @egoist/[email protected]
npm ERR!   node_modules/@egoist/vue-to-react
npm ERR!     @egoist/vue-to-react@"^1.1.0" from @storybook/[email protected]
npm ERR!     node_modules/@storybook/addon-docs
npm ERR!       @storybook/addon-docs@"^5.3.4" from [email protected]
npm ERR!       node_modules/symphony-bdk-ui-toolkit
npm ERR!         dev symphony-bdk-ui-toolkit@"^1.0.2-beta.0" from the root project
npm ERR!   42 more (@emotion/core, @emotion/react, @emotion/styled, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.2" from @mui/[email protected]
npm ERR! node_modules/@mui/icons-material
npm ERR!   @mui/icons-material@"^5.2.4" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR!   peer react@"^17.0.2" from @mui/[email protected]
npm ERR!   node_modules/@mui/icons-material
npm ERR!     @mui/icons-material@"^5.2.4" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/runner/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2022-06-16T02_22_34_913Z-debug-0.log
Error: Process completed with exit code 1.

Here is my yaml file of my github workflow :

name: Build and Push to GCP (Production)

on:
  workflow_dispatch:

env:
  GKE_PROJECT: sym-prod
  DOCKER_IMAGE: gcr.io/sym/contactApp
  DOCKER_IMAGE_TAG: JAVA-${{ github.sha }}
  SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

jobs:
  test-build-push:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Install NPM Packages
        run: npm ci

      - name: Build App
        run: |
          REACT_APP_BUILD_SHA=${{ github.sha }} \
          REACT_APP_BUILD_DATE=$(date +'%F %T %Z') \
          npm run build-for-java
      - name: Build Docker
        run: docker build -t ${{ env.DOCKER_IMAGE }} -f Dockerfile .

Any leads would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文