React Native - "response-native-interface.js" - WebStorm

For active users - WebStorm users:

I am running a project using React Native using WebStorm for Jet Brains websites.

In project => node_modules / reaction-native / Libraries / reaction-native / reaction-native-interface.js

IDE get syntax errors:

reaction-native-interface.js syntax error print.jpg

Am I missing a library or plugin?

+5
source share
1 answer

You see a syntax error because WebStorm considers the file to be regular JS. However, it is actually written in Flow.

Ultimately, the stream is converted to JS, like TypeScript. Read more about Flow here: https://flowtype.org/

Honestly, don’t worry about this if you don’t mess with the main files (which you don’t need if you don’t fix the errors).

I know it is annoying to have red squiggly lines in your project. You can simply close your project and reopen it. This will remove the red squiggly lines!

If you want to enable stream syntax, follow these steps: https://www.jetbrains.com/help/webstorm/2016.2/using-the-flow-type-checker.html

EDIT: A faster hack to delete lines is to close the file with an error. Right-click on it in the project view, mark it as plain text, then mark it as a JS file. Voila! Just make sure you are not opening the file, otherwise repeat the steps. lol

+7
source

All Articles