react.js - 'import' and 'export' may only appear at the top level
本文介绍了react.js - 'import' and 'export' may only appear at the top level的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
有没有大神在线 我遇到个问题
就是 运行 时候报
'import' and 'export' may only appear at the top level
但是'import' 和 'export' 写的没有问题啊 别的页面也都是相同的方法写的,没报过这个错啊
解决方案
我遇到过。最后查到原因是代码块中少写一个 }
这篇关于react.js - 'import' and 'export' may only appear at the top level的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文