An error Unexpected token, expected }
suddenly appeared without a clear cause.
Line 136:7 is right where it says master: {
const styles = StyleSheet.create({
master: {
flex: 1,
justifyContent: 'center',
flexDirection: 'row',
alignItems: 'center',
flexWrap: 'wrap'
}
});
It was working fine before. I have tried:
rm -rf node_modules && npm install
npm start -- --reset-cache
No changes from either of those.
The JavaScript exceptions "unexpected token" occur when a specific language construct was expected, but something else was provided. This might be a simple typo.
As you write your JavaScript application, the unexpected token error always occurs because JavaScript expected a specific syntax that's not fulfilled by your current code. You can generally fix the error by removing or adding a specific JavaScript language symbol to your code.
This error was due to a missing </>
in my render method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With