VS Code error when Debugging a React-Native project

Viewed 2044

I'm new to Stack overflow and i'm also new to React Native.

I was following a tutorial to put my new React Project in VS Code but when I needed to Debug the project an error pop-up :

An error occured while launching the application. Apparently you are trying to debug from a directory that is not a React Native project root. (Error code 604) (Error code 303).

I really didn't do anything special, no new page, not even a new line of code. It's a new project created via this command :

npx react-native init <Name_of_the_project>

I installed the prerequisites of React Native thanks to its documentation.

  • Chocolatey: choco install -y nodejs.install openjdk8
  • Android Studio is working just fine.
  • Added environment variable
  • Added platform-tools to Path

The link of the tutorial I was reading to be able to use VS Code and React Native :

https://www.ryadel.com/en/react-native-visual-studio-code-windows-hello-world-sample-app/

It's probably a beginner's mistake or a step that I didn't do well. Don't hesitate to ask me for more information, I don't really know what to show you except my launch.json and a error in my app.js :

launch.json

app.js

EDIT : Yep it's was a stupid error, the launch.json was not in the file of my project ...

Sorry for this post :S

0 Answers
Related