Closed15
モバイルアプリ開発

仕様技術
React Native+Expo+ViroReact

関係なし

expo start --tunnel

yarn add @expo/ngrok

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
- .envにPCのプライベートIPを書く。
- exp://172.17.28.40:19000にアクセスしろとターミナルに出る(スマホ(Expo Go)からアクセスできない)
- について
19000ポートがFWによって制限されている可能性

これの作業ログを
に残しました。
Dockerでの開発はきつそうです。
このスクラップは2022/06/19にクローズされました