Closed15

モバイルアプリ開発

0Yu0Yu

仕様技術

React Native+Expo+ViroReact

うーたんうーたん
expo_sample> docker compose run --rm expo bash --login
ls
8980d584f3d9:/usr/src/app# ls
App.js           assets           node_modules     yarn.lock
app.json         babel.config.js  package.json
8980d584f3d9:/usr/src/app# expo start --tunnel
┌─────────────────────────────────────────────────────────────────────────┐
│                                                                         │
│   There is a new version of expo-cli available (5.4.8).                 │
│   You are currently using expo-cli 5.4.7                                │
│   Install expo-cli globally using the package manager of your choice;   │
│   for example: `npm install -g expo-cli` to get the latest version      │
│                                                                         │
└─────────────────────────────────────────────────────────────────────────┘
Starting project at /usr/src/app
Developer tools running on http://localhost:19002
Starting Metro Bundler
✔ The package @expo/ngrok@^4.1.0 is required to use tunnels, would you like to install it globally? … no
Error starting ngrok: Please install @expo/ngrok@^4.1.0 and try again, or try using another hosting method like lan 
or localhost
Tunnel URL not found (it might not be ready yet), falling back to LAN URL.
Tunnel URL not found (it might not be ready yet), falling back to LAN URL.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█ ▄▄▄▄▄ █ ██▀▀ ▀▄██ ▄▄▄▄▄ █
█ █   █ █  ▀█ ▀█ ██ █   █ █
█ █▄▄▄█ █▀  █▄█▀▄██ █▄▄▄█ █
█▄▄▄▄▄▄▄█▄█ ▀▄█▄█▄█▄▄▄▄▄▄▄█
█▄▄██▄ ▄█▀█▄█▄▀▄ ███ ▀▄▄ ▄█
█▀▄█▄  ▄ ▄ ▄█▀█▀  ▀ █▄  ▀██
█▀ ▀▄▀▄▄ █▀▀▄▀█▄ ▄▀▄▀▀▄ ▀██
███ █▄█▄▄▀█▄ ▄█▀▄ ▄█ ▄ ▀███
█▄▄▄▄▄▄▄▄ █▄█▄▀▄▀ ▄▄▄ ▀ ▄▄█
█ ▄▄▄▄▄ █▀▀ █▀██▀ █▄█ ▀▀▀██
█ █   █ █▄▀█▄ ▀▄█ ▄ ▄▄▀ ▀▀█
█ █▄▄▄█ █▀▀█ ███▀██▄▀█▀▀ ██
█▄▄▄▄▄▄▄█▄█▄███▄██▄█▄▄▄▄▄▄█

› Metro waiting on exp://172.17.28.40:19000
› Scan the QR code above with Expo Go (Android) or the Camera app (iOS)

› Press a │ open Android
› Press w │ open web

› Press r │ reload app
› Press m │ toggle menu
› Press d │ show developer tools
› shift+d │ toggle auto opening developer tools on startup (disabled)

› Press ? │ show all commands

Logs for your project will appear below. Press Ctrl+C to exit.
Started Metro Bundler

expo start --tunnelでngrokを立ち上げてもTunnel URL not found (it might not be ready yet), falling back to LAN URL.で動作しない。

dockerコンテナ内にngrokがないことが原因かも(dockerを使わなければ解決できそう)

うーたんうーたん
REACT_NATIVE_PACKAGER_HOSTNAME=172.17.28.40
  1. .envにPCのプライベートIPを書く。
  2. exp://172.17.28.40:19000にアクセスしろとターミナルに出る(スマホ(Expo Go)からアクセスできない)
  1. について
    19000ポートがFWによって制限されている可能性
このスクラップは2022/06/19にクローズされました