Skip to content

'npm run build' results in Command failed with ENOENT: npm run build #57

Description

@NiketanG

Using the action to build and then deploy a Next.js Project to Netlify from Github CI/CD. The Config is as follows:

      - name: 🧰 Install dependencies for Next.js Build
        run: npm install
        
      - name: 📦 Run Next.js build to generate the static files
        run: npm run build

      - name: 🚀 Deploy to Netlify
        id: deploy-netlify
        uses: netlify/actions/cli@master
        env:
          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
        with:
          args: build


This uses the netlify-plugin-nextjs. Which fails to build the project (execute npm run build) with the following error:

Screenshot from 2022-02-23 01-43-51

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions