关于React Native 报Export declarations are not supported by current JavaScript version错误的解决问题
2018-03-13 15:13
696 查看
设置.js文件默认以jsx的语法打开
在没有进行设置的情况下,每次打开WebStorm的时候打开包含jsx语法的.js文件都会有以下提示:当然我们点击转换后就可以了,但是每次都会提示,所以还是来一个一劳永逸的方法把它给去掉吧:
然后Apply/OK即可。
设置.js文件中支持react-native语法高亮
首先会发现在js文件中有不少的警告,类似这样:这个警告的原因是因为编辑器不知道所引用的这些东西是在哪(不知道源在哪),所以需要告诉编辑器所写的东西是在哪个源里面:
在下图的download manager里面找到react和react-native下载安装,然后返回到上图的窗口,按照上图第五部分勾选刚才下载的两个library即可。
至此完毕,最终效果如下:
警告和报错都得以解决了。可以安心的写代码了,哈哈!如果上面处理后还有问题,请点击设置你IDE的JavaScript版本。seting-->
相关文章推荐
- 关于React Native 报Export declarations are not supported by current JavaScript version错误的解决问题
- 关于React Native 报Export declarations are not supported by current JavaScript version错误的解决问题
- 关于React Native 报Export declarations are not supported by current JavaScript version错误的解决问题
- 关于React Native 报Export declarations are not supported by current JavaScript version错误的解决问题
- [置顶] 解决let definenation are not supported by current JavaScript version
- WebStorm:let definenation are not supported by current JavaScript version解决方案
- let definitions are not supported by current javascript version
- webstorm编写ES6报错:Classes are not supported by current JavaScript version
- Method definition shorthands are not supported by current JavaScript version
- let definitions are not supported by current javascript version
- 关于Servlet报错:405 HTTP method GET is not supported by this URL问题解决方法
- let definitions are not supported by current javascript
- HTTP method GET is not supported by this URL 问题解决
- 【问题解决】Project facet Java version 1.7 is not supported.
- 编译vlc-android 提示错误:libavcodec versions 56 and later are not supported yet解决办法
- 解决国外空间Access错误Selected collating sequence not supported by the operating system
- 【问题解决】Project facet Java version 6.0 is not supported.
- "Only TrueType fonts are supported. This is not a TrueType font."问题解决
- 【问题解决】Project facet Java version 1.7 is not supported.
- Graphical installers are not supported by the VM解决办法