Skip to content

ionic serve: does not start/reload react project if compilation warnings #4205

Description

@mirkonasato

Description:

ionic serve (and other commands) does not start (or livereload on change if already running) if there are any compilation warnings in the code.

I believe that's because react-scripts in that case outputs Compiled with warnings but the Ionic CLI is always expecting Compiled successfully.

Steps to Reproduce:

Create a new Ionic React app with

ionic start my-app blank --type=react

Change the code and add something that results in a warning, e.g. an unused variable or import, or an img tag without alt attribute.

Run ionic serve and it'll be stuck "Starting the development server..." forever.

My ionic info:

Ionic:

   Ionic CLI       : 5.4.5 (/Users/mirko/.config/yarn/global/node_modules/ionic)
   Ionic Framework : @ionic/react 4.11.3

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v12.13.0 (/Users/mirko/.nvm/versions/node/v12.13.0/bin/node)
   npm    : 6.12.0
   OS     : macOS Catalina

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions