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.