Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning Error from chokidar - Error: ENOSPC: System limit for number of file watchers reached #317

Closed
abohannon opened this issue Mar 12, 2021 · 1 comment

Comments

@abohannon
Copy link

abohannon commented Mar 12, 2021

After running the dev server and before the Cypress run I get thousands of logs about exceeding file watchers.
Screen Shot 2021-03-11 at 5 25 35 PM

Curious if this is something that can be rectified via the plugin interface somehow or if it's an issue with Github Actions? The test eventually runs fine, but in order to see the results you have to scroll through thousands of logs to find them.

Workflow config

name: Cypress end-to-end tests
on: [push]
jobs:
  cypress-run:
    runs-on: ubuntu-16.04
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          persist-credentials: false
      # Install NPM dependencies, cache them correctly
      # and run all Cypress tests
      - name: Cypress run
        uses: cypress-io/github-action@v2
        with:
          start: npm start
          wait-on: http://localhost:4000
          wait-on-timeout: 6000

@abohannon
Copy link
Author

abohannon commented Mar 13, 2021

I was able to fix this by including CHOKIDAR_USEPOLLING=1 in my start command.

Ultimately it looks like it's not an issue with this action but with Gatsby's dev server. Got the idea from this thread in Gatsby's repo: gatsbyjs/gatsby#15843

// package.json
"develop:ci": "CHOKIDAR_USEPOLLING=1 npm start"

// workflow yml
 - name: Cypress run
        uses: cypress-io/github-action@v2
        with:
          start: npm run develop:ci
          wait-on: http://localhost:4000
          wait-on-timeout: 6000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant