简体   繁体   中英

Error running React-native project in WebStorm

This project I can run fine in command line, but if I run it using WebStorm, there will be an error like the following image:

错误图片

I guess your webstorm is still using ecmascript 5.1 for javascript which does not support import keyword that is why ur getting this error. U can fix it by going to preferences(on mac) and file->settings->language and frameworks->javascript change javascript language version from ecma5.1 to ecma6 or react jsx

I didn't set run/debug configurations. I run a react-native project as a node js. It run successfully when I set the configuration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM