admin管理员组文章数量:1393889
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'
}
});
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.
Share Improve this question edited Nov 23, 2018 at 11:33 B--rian 5,88011 gold badges47 silver badges100 bronze badges asked Mar 7, 2017 at 21:20 softdownfeatherssoftdownfeathers 2291 gold badge2 silver badges13 bronze badges3 Answers
Reset to default 8This error was due to a missing </>
in my render method.
in my case the error was
unexpected token , expected ","
. the reason was in the stylesheet, used = in place of :
color = colors.white
instead of color: colors.white
In my case, ComponentDidUpdate
was after the render()
method.
本文标签: javascriptReact Native Syntax Error Unexpected Tokenexpected Stack Overflow
版权声明:本文标题:javascript - React Native Syntax Error: Unexpected Token, expected } - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1740001365a2219597.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论