github action fail on react with Cannot find file?

Viewed 210

github action keep failing with Cannot find file? i was able to run npm run build on my terminal but not on github actions? what am I missing?

newproject@0.1.0 build /home/runner/work/newproject/newproject/website react-scripts build

Creating an optimized production build... Failed to compile.

./src/containers/routes/routes.js Cannot find file '../homePage' in './src/containers/routes'.

firebase-hosting-merge.yml

name: Build and Deploy
on:
  push:
    branches:
      - master

jobs:
  build:
    name: Build Website 
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@master
      - name: Install Website Dependencies
        run: cd website && npm install 
      - name: Audit & Fund Website Dependencies
        run: cd website && npm audit fix && npm fund
      - name: Build Website
        run: cd website && CI=false npm run build <<-------------fail at this
  deploy:
    name: Deploy Website to Live
    needs: build
    runs-on: ubuntu-latest
    steps:
      - name: Deploy to Live Domain
        uses: w9jds/firebase-action@master
        with:
          args: deploy --only hosting:dev
        env:
          FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
0 Answers
Related