Esse repositório contém uma série de erros (e suas soluções) que você pode ter com o Expo.
Verifique se você instalou o expo-cli
e se foi configurado corretamente no seu $PATH
.
Para mais informações sobre como instalar o expo-cli
verifique a documentação.
Esse erro ocorre principalmente no Windows por conta de pastas que possuem espaços, pontos, acentos ou outros caracteres inválidos (ex: "Semana Omnistack" ou "C:\Users\João Pedro"). Para evitar esse erro, recomendamos que crie seu projeto na raíz do seu drive, por exemplo: "C:\SemanaOmnistack\".
Esse erro também pode ser encontrado caso você esteja utilizando a versão 12+ do NodeJs, nesse caso, basta fazer o downgrade para a versão 10.
expo init mobile --template blank
yarn start
ou expo start
através do terminal do seu computador ao invés de usar o terminal embutido do VSCode;exp://192.168.0.5:19000
. Se o erro persistir, opte pela conexão do tipo Tunnel lá na pagina do Expo e utilize a URL/QR Code disponibilizado.SpotSchema.virtual('thumbnail_url').get(function() {
return `http://IP_DA_SUA_REDE:3333/files/${this.thumbnail}`;
});
app.json
:{
"expo": {
...
//adicione as linhas abaixo
"androidStatusBar": {
"barStyle": "dark-content",
"backgroundColor": "#ffffff"
},
}
}
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc sysctl.conf && sudo sysctl -p
em seu terminal e o problema será resolvido.behavior
como null
, pois em dispositivos Android ele se comportará melhor sem o behavior
.import { KeyboardAvoidingView, Platform } from 'react-native';
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : null}>
... outros componentes ...
</KeyboardAvoidingView>;
expo -h
através do Microsoft PowerShell e a mensagem de erro apresentada seja
expo : O arquivo C:\USUARIO\AppData\Roaming\npm\expo.ps1 não pode ser carregado porque a execução de scripts foi desabilitada neste sistema. Para obter mais informações, consulte about_Execution_Policies em https://go.microsoft.com/fwlink/?LinkID=135170. No linha:1 caractere:1
+
expo -h
>+ ~~~~
>+
CategoryInfo : ErrodeSegurança: (:) [], PSSecurityException
>+
FullyQualifiedErrorId : UnauthorizedAccess
Get-ExecutionPolicy
. Irá aparecer RestrictedSet-ExecutionPolicy Unrestricted
, apertar enter e digitar S para aceitar a alteração da política de execuçãoGet-ExecutionPolicy
novamente, o terminal deverá mostrar UnrestrictedAo executar o script expo -h
, o Porwershell pode restringir sua execução. Para resolver o problema, basta remover a restrição com o comando set-executionpolicy bypass
e executar o script do expo novamente. O comando get-executionpolicy
pode ser utilizado para saber qual o nível de restrição está sendo utilizado.
Para mais informações sobre as restrições, acesse a documentação da microsoft