Expo and build for web fails
See original GitHub issueHello
I just started a new expo project today. Managed flow, empty js project. I added dripsy and few other stuff, it builds and works correctly in native versions, on iOS simulator at least. But web version doesn’t build and I am getting this:
Failed to compile:
Module parse failed: Unexpected token (15:12)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| // if (options) setDripsyOptions(options)
| const ResponsiveContextProvider = Platform.OS === 'web' ? MediaContextProvider : React.Fragment;
> return (<ResponsiveContextProvider>
| <DripsyContext.Provider value={dripsyOptions}>
| <ThemeUIProvider {...props}/>
node_modules/@dripsy/core/build/provider/fresnel.js 17:29
Module parse failed: Unexpected token (17:29)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| });
| const ssrStyleReset = createMediaStyle();
> const SSRStyleReset = () => (<style type="text/css" dangerouslySetInnerHTML={{ __html: ssrStyleReset }}/>);
| export { SSRMediaQuery, SSRStyleReset, ssrStyleReset, MediaContextProvider };
| //# sourceMappingURL=fresnel.js.map
… and few more similar errors…
Package json dependencies:
"dependencies": {
"@react-native-community/masked-view": "0.1.10",
"@react-navigation/bottom-tabs": "^5.11.9",
"@react-navigation/native": "^5.9.4",
"@react-navigation/stack": "^5.14.4",
"axios": "^0.21.1",
"dayjs": "^1.10.4",
"dripsy": "^1.5.5-alpha.6",
"expo": "~40.0.0",
"expo-status-bar": "~1.0.3",
"firebase": "^8.3.3",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
"react-native-gesture-handler": "~1.8.0",
"react-native-reanimated": "~1.13.0",
"react-native-safe-area-context": "3.1.9",
"react-native-screens": "~2.15.2",
"react-native-web": "~0.13.12"
},
"devDependencies": {
"@babel/core": "^7.9.0"
},
Web version is working correctly, until I import any dripsy component… Any ideas?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Troubleshooting build errors and crashes - Expo Documentation
Go to your build details page (find it on the build dashboard if you don't have it open already) and expand any failed...
Read more >Error when generating build for web · Issue #2554 - GitHub
Description When running expo build:web it gives a error Example https://github.com/LorhanSohaky/example-expo-build-web-error Observed ...
Read more >5 common errors found in a React Native app (using Expo)
In this article, I will list 5 errors that we as developers faced, while creating a mobile app in React Native (using Expo)...
Read more >Expo build failed for android - react native - Stack Overflow
I ran the command expo build -p android to create an apk for this purpose and got the error message: [stderr] FAILURE: Build...
Read more >Expo Status (@expo_status) / Twitter
status.expo.dev. Upstream issue with React-Native release causing all Android builds to fail. A fix has been implemented for Expo SDK 43 through 47...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

It’s working now. Thank you.
Sounds good! If you run
yarn add dripsy, I just released a version with improved web performance.