Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): add web support check to metro web in expo start. #18428

Merged
merged 3 commits into from Aug 10, 2022

Conversation

EvanBacon
Copy link
Contributor

Why

We weren't checking for web support before. This caused Metro web to crash with:

Error: Cannot find module 'react-native-web/package.json'
Require stack:
- /Users/evanbacon/Documents/GitHub/lab/polyfill-issue/node_modules/@expo/cli/build/src/start/server/metro/withMetroMultiPlatform.js
- /Users/evanbacon/Documents/GitHub/lab/polyfill-issue/node_modules/@expo/cli/build/src/start/server/metro/instantiateMetro.js
- /Users/evanbacon/Documents/GitHub/lab/polyfill-issue/node_modules/@expo/cli/build/src/start/server/metro/MetroBundlerDevServer.js
- /Users/evanbacon/Documents/GitHub/lab/polyfill-issue/node_modules/@expo/cli/build/src/start/server/DevServerManager.js
- /Users/evanbacon/Documents/GitHub/lab/polyfill-issue/node_modules/@expo/cli/build/src/start/startAsync.js
- /Users/evanbacon/Documents/GitHub/lab/polyfill-issue/node_modules/@expo/cli/build/src/start/index.js
- /Users/evanbacon/Documents/GitHub/lab/polyfill-issue/node_modules/@expo/cli/build/bin/cli

If react-native-web was not installed.

How

Test Plan

Checklist

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Jul 30, 2022
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
@EvanBacon EvanBacon marked this pull request as ready for review August 1, 2022 11:29
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Aug 1, 2022
@EvanBacon EvanBacon merged commit c6fb96a into main Aug 10, 2022
@EvanBacon EvanBacon deleted the @evanbacon/cli/add-web-support-check-to-metro-web branch August 10, 2022 11:33
Ddv0623 pushed a commit to preciofishbone/expo that referenced this pull request Sep 26, 2022
…18428)

* feat(cli): add web support check to metro web in `expo start`.

* Update packages/@expo/cli/CHANGELOG.md

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants