I've updated my react, expo and expo-cli version recently and am trying to get expo web running on this updated project, but whenever I run expo start --web
I get the following error:
web Failed to compile.
/App/App.js
SyntaxError: /App/App.js: Unexpected token (6:9)
4 |
5 | const App = () => {
> 6 | return <Text>Hii</Text>;
| ^
7 | };
8 |
9 | export default App;
The app works fine on IOS and android, but I keep getting this error for web.
Not sure what's causing the error.
I've added "web"
to platform
in my app.json
My app file is
import React from "react";
import { Text } from "react-native";
const App = () => {
return <Text>Hii</Text>;
};
export default App;