Rocketseat / expo-common-issues

Common issues while developing with Expo
1.08k stars 127 forks source link
expo issues-and-fixes react-native

Expo common issues

Esse repositório contém uma série de erros (e suas soluções) que você pode ter com o Expo.

Issues

Expo command not found

Invalid Regular Expression

Input is required, but Expo CLI is in non-interactive mode.

Network response timed out

The internet connection appears to be offline.

Imagens não aparecendo no dispositivo físico

SpotSchema.virtual('thumbnail_url').get(function() {
  return `http://IP_DA_SUA_REDE:3333/files/${this.thumbnail}`;
});

Logo ou Texto aparecendo atrás das barra de status no Android

{
  "expo": {
    ...
    //adicione as linhas abaixo
    "androidStatusBar": {
      "barStyle": "dark-content",
      "backgroundColor": "#ffffff"
    },
  }
}

ENOSPC: System limit for number of file watchers reached

KeyboardAvoidingView não funciona no Android

import { KeyboardAvoidingView, Platform } from 'react-native';

<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : null}>
  ... outros componentes ...
</KeyboardAvoidingView>;

UnauthorizedAccess on run Expo command on Microsoft PowerShell

+ expo -h
> + ~~~~
> + CategoryInfo : ErrodeSegurança: (:) [], PSSecurityException
> + FullyQualifiedErrorId : UnauthorizedAccess

  1. No Microsoft PowerShell digitar Get-ExecutionPolicy. Irá aparecer Restricted
  2. Em seguida, digitar Set-ExecutionPolicy Unrestricted, apertar enter e digitar S para aceitar a alteração da política de execução
  3. Após feitos os passos anteriores, se digitar Get-ExecutionPolicy novamente, o terminal deverá mostrar Unrestricted

O arquivo não pode ser carregado