Ionic-cli: ionic doctor: viewport-fit-not-set looking at src/index.html for Ionic 1

Created on 5 Oct 2018  Â·  7Comments  Â·  Source: ionic-team/ionic-cli

[ERROR] Error while checking viewport-fit-not-set:

    Error: ENOENT: no such file or directory, open 
    .../src/index.html'

ionic 1
cordova: 8.1.1

The problem seems to be the fact that it searches inside /src/index.html
when it should search .../www/index.html

bug ionic1

All 7 comments

Thanks for the report, @deliverymanager! This is fixed in 4.2.1.

Now the ionic doctor check catches the issue but it does not detect it right.
I have the following code in my index.html
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width, viewport-fit=cover">
and it still throws error.

The same for me on v4-rc0

Look at https://github.com/ionic-team/starters/blob/master/angular/base/src/index.html

    <meta
      name="viewport"
      content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
    />

@reajuria Thanks, we fixed it in the starters... but the regex in ionic doctor still may need to be updated to handle newlines. I'd love a PR that fixes that 😄

@reajuria Thanks, we fixed it in the starters... but the regex in ionic doctor still may need to be updated to handle newlines. I'd love a PR that fixes that 😄

Thanks @dwieeb, added PR #3809 for ViewportFixNotSet Ailment

Looks like regression:

$ ionic -v
6.11.11

$ ionic doctor check

â ‡ Detecting issues: 8 / 9 complete [ERROR] Error while checking viewport-fit-not-set:

        Error: ENOENT: no such file or directory, open 'xxxxxxxxxxxxxx/src/index.html'
✔ Detecting issues: 9 / 9 complete in 12.42ms

But, index.html is located as public/index.html, this is result of React 'sidemenu' template.

@ppmag Care to make a new issue? This looks like a React issue, specifically. (not related to the original fix).

Was this page helpful?
0 / 5 - 0 ratings