Skip to content

react-scripts start should support CI=true, watchAll=false etc. #8125

Description

@blmoore

Is your proposal related to a problem?

I'm running react-scripts start in a CI environment in order to run cypress end-to-end tests. As the project has grown this has started hitting the inotify.max_user_instances kernel limit which cannot be configured from within a container, this is reported as:

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: watch /path/to/somewhere ENOSPC
    at FSWatcher.start (fs.js:1382:19)
    at Object.fs.watch (fs.js:1408:11)
    at createFsWatchInstance (/path/to/somewhere

Describe the solution you'd like

react-scripts start should support flags already used with react-scripts test that turn off webpack's file watching, these include env var CI and commandline flags --watchAll=false

Describe alternatives you've considered

I could use my production express server or something else to serve these files, but these aren't dependencies of the app whereas it's already using webpack-dev-server with configurable watch options.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions