[英]npm ERR! Failed during build script on github actions
我有用 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: |
CI=false npm install
CI=false npm run build --if-present
我在 github 問題和 stackOverflow 上發現了一些問題,答案在這一行中指出。 但這對我沒有幫助。
拜托,你能幫我嗎? 最好的祝福。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.