* metro (the local dev server) is run from the wrong folder. check if metro is running, stop it and restart it in the current project.

To fix the issue of metro (the local dev server) running from the wrong folder, you need to check if metro is currently running, stop it if it is, and then restart it in the current project directory. Here’s how you can do it:

  1. Open the terminal or command prompt and navigate to the directory where the current project is located. For example, if your project is in a folder named “my-project”, you can use the following command to navigate to that folder:
    cd path/to/my-project
  2. Once you are in the correct project directory, you can check if metro is running by running the following command:
    npx react-native start
  3. If metro is running, you will see the output in the terminal. In that case, you need to stop metro before restarting it in the current project. To stop metro, you can use the keyboard shortcut “CTRL + C” (or “CMD + C” on macOS) in the terminal where metro is running.
  4. After stopping metro, you can restart it in the current project directory using the following command:
    npx react-native start

Read more interesting post

Leave a comment