ionic-team / ionic-team/ionic-cli

ionic doctor check viewport-fit-not-set [ionic-vue]

Aberta
#4,628 1 comentário 0 reações 0 responsáveis Ver no GitHub
triage
Linguagem predominante
TypeScript
Estrelas
2k
Forks
682
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

**Description:**
hello,
i've an issue with ionic doctor check command

ionic doctor check viewport-fit-not-set try to find the index.html in wrong directory
my outputDir is www and doctor try to check the index in src directory

i'am a little bit confused about the use of capacitor.config.json and ionic.config.json
maybe i'm doing wrong

**Steps to Reproduce:**
Run:
```
ionic doctor check viewport-fit-not-set
```

**Output:**
```
Error: ENOENT: no such file or directory, open '/home/user/projects/my-project/src/index.html'
```

**My `ionic info`:**

```
Ionic:

Ionic CLI : 6.12.3 (/home/franckysolo/.npm-global/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 5.5.2

Capacitor:

Capacitor CLI : 2.4.5
@capacitor/core : 2.4.5

Utility:

cordova-res : not installed
native-run : 1.3.0

System:

NodeJS : v12.20.0 (/usr/bin/node)
npm : 6.14.8
OS : Linux 4.15

```

**Other Information:**

capacitor.config.json

```
{
"appId": "com.my-project.api",
"appName": "my-project",
"bundledWebRuntime": false,
"npmClient": "yarn",
"webDir": "www",
"plugins": {
"SplashScreen": {
"launchShowDuration": 0
}
},
"android": {
"allowMixedContent": true,
"captureInput": true,
"webContentsDebuggingEnabled": true
},
"cordova": {
"plugins": {
"cordova-plugin-streaming-media": {},
"phonegap-plugin-barcodescanner": {}
}
},
"linuxAndroidStudioPath": "/opt/android-studio/bin/studio.sh"
}
```

ionic.config.json

```
{
"name": "traidauto-front",
"integrations": {
"capacitor": {}
},
"type": "vue",
"srcDir": "www", # try this fix but not working
"npmClient": "yarn"
}
```

i 've check the code in ionic cli
the ViewportFitNotSet class get directory from this.project.getSourceDir() which is return src
line 234 in detected methode so maybe is the normal behaviour so how can change the src dir for checking viewport?

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Start with the ViewportFitNotSet detection code, especially the referenced line 234 and its use of project.getSourceDir(); compare that behavior with capacitor.config.json and ionic.config.json, including webDir and srcDir. Reproduce the command with the reported www layout, then verify that viewport-fit-not-set checks the intended index.html without the ENOENT error.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
typescript
Domínio
cli
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.