Skip to content

Commit 56a788b

Browse files
committed
fix(sandbox): let create-expo-app install so 'expo install' can bake web deps
The Expo template step used create-expo-app --no-install then 'expo install', which fails ('expo' not installed). Drop --no-install so expo exists; the web deps land in package.json and node_modules is removed (runtime pnpm-installs). Validated by building the snapshot on Daytona infra.
1 parent 9bdb2d4 commit 56a788b

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/build-snapshot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
chmod +x daytona
3636
sudo mv daytona /usr/local/bin/daytona
3737
daytona version
38+
# The CLI no longer auto-reads DAYTONA_API_KEY; a profile must be created explicitly.
39+
daytona login --api-key "$DAYTONA_API_KEY"
3840
- name: Build & publish snapshot
3941
run: |
4042
# Idempotent: drop the previous snapshot of this name (existing sandboxes

infra/containers/sandbox/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ RUN npx create-next-app@16.2.6 /home/node/cheatcode-next-template --yes --ts --t
120120
# default template, but @expo/metro-runtime does not) so `expo start --web` renders the
121121
# app as a web page in the Computer-panel iframe. `expo install` picks SDK-matched
122122
# versions; web.bundler=metro selects the Metro web bundler for Expo Router.
123-
RUN npx --yes create-expo-app@latest /home/node/cheatcode-expo-template --template default --no-install \
123+
# Install (not --no-install) so `expo` exists for `expo install` to resolve SDK-matched web-dep
124+
# versions; those land in package.json, then node_modules is dropped (runtime pnpm-installs it).
125+
RUN npx --yes create-expo-app@latest /home/node/cheatcode-expo-template --template default \
124126
&& cd /home/node/cheatcode-expo-template \
125127
&& CI=1 EXPO_NO_TELEMETRY=1 npx --yes expo install react-dom react-native-web @expo/metro-runtime \
126128
&& node -e 'const fs=require("fs");try{const j=JSON.parse(fs.readFileSync("app.json","utf8"));j.expo=j.expo||{};j.expo.web={...(j.expo.web||{}),bundler:"metro",output:"single"};fs.writeFileSync("app.json",JSON.stringify(j,null,2));}catch(e){}' \

0 commit comments

Comments
 (0)