Getting npm ci && npm run build Error with GitHub Actions (React-Firebase app)

Viewed 274

I have the following .yml file:

# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
'on':
  push:
    branches:
      - main
jobs:
  build_and_deploy:
    runs-on: ubuntu-latest
    steps:
    
      - uses: actions/checkout@v2
      - run: npm ci && npm run build
      - uses: FirebaseExtended/action-hosting-deploy@v0
        with:
          repoToken: '${{ secrets.GITHUB_TOKEN }}'
          firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_PROTOTYPE_D7D0D }}'
          channelId: live
          projectId: prototype-d7d0d

As soon as I push to the main branch, the build fails at the statement 'npm ci && npm run build' with the following messages:


Run npm ci && npm run build
npm ci && npm run build
shell: /usr/bin/bash -e ***0***
npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
added 1532 packages, and audited 1533 packages in 44s
215 packages are looking for funding
  run `npm fund` for details
6 moderate severity vulnerabilities
To address all issues (including breaking changes), run:
  npm audit fix --force
Run `npm audit` for details.
> test-firebase-cicd@0.1.0 build
> react-scripts build
Creating an optimized production build...
Failed to compile.
Module not found: Error: Can't resolve 'react-admin' in '/home/runner/work/prototype-test/prototype-test/src'
Error: Process completed with exit code 

I went through other answers/articles that describe similar issues and tried implementing them but no luck so far. Please let me know in the comments if you want me to provide any more details. Any assistance is appreciated, thanks.

0 Answers
Related