【发布时间】:2021-09-09 03:45:25
【问题描述】:
我有用 react 编写的前端应用程序。我需要将它部署在 azure 上。此外,我必须使用 github 操作。在构建过程中出现此错误:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react_with_mobix@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react_with_mobix@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-06-25T18_19_29_860Z-debug.log
Error: Process completed with exit code 1.
我的 .yml 文件看起来:
name: Build and deploy Node.js app to Azure Web App - uj-ebiznes-front
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: npm install, build, and test
run: |
CI=false npm install
CI=false npm run build --if-present
- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'app_name'
slot-name: 'production'
publish-profile: //there's my secret
package: .
我已经用 run on 换行了:
run: |
CI=false npm install
CI=false npm run build --if-present
我在 github 问题和 stackOverflow 上发现了一些问题,其中答案在这一行显示。但这对我没有帮助。
拜托,你能帮帮我吗?最好的问候。
【问题讨论】:
标签: node.js reactjs azure npm github-actions