0

Has anyone made eslint work with create-react-native-app in vscode on Windows 10? It is so unstable it's making my skin itch! Latest npm doesn't work with create-react-native-app so I installed yarn. Now I can create an app. But I have to do this with cmd prompt outside of vscode otherwise I get no QR code to launch app on my phone. I tried to install eslint locally with yarn, and use airbnb linting rules - this fails - if I install it with npm it works and I can initialise it with airbnb rules. Yay! I now have linting in my project.....but wait! Now I cannot start my project anymore because:

react-native-scripts start 'react-native-scripts' is not recognized as an internal or external command, operable program or batch file.

This is killing me!! It's taken about 8 hours of $%^#ing around and I haven't even got to try any react native coding yet! Is it supposed to be this insane just to set up the environment?!!?

Anyone have any suggestions? I googled and looked at github issues but I see no solutions for this.

Thanks in advance!

Antony Castle
  • 193
  • 1
  • 11

1 Answers1

0

Version 1.5.2 of create-react-app has options for using npm instead of Yarn as well as using a specific npm version. Use create-react-app -h to view help.

Have you also tried adding the following to your VS Code settings when using Yarn?

"eslint.packageManager": "yarn"
Darren Evans
  • 665
  • 10
  • 17