I'm experiencing an error while using the React Native Tools extension in Visual Studio Code. Here are the details:
Environment:
- Operating System: macOS Monterey M1 Pro
- React Native Version: 0.74
- Node.js Version: v22.2.0
- Project Template: TypeScript template
Error Description:
Whenever I try to debug my React Native project, I encounter the following error:Launching the applicationAn error occurred while launching the application. Cannot find module '/Users/is789/Desktop/NextCall/node_modules/@react-native-community/cli-platform-ios/build/config/findXcodeProject'Require stack:
/Users/is789/.vscode/extensions/msjsdiag.vscode-react-native-1.13.0/dist/rn-extension.js/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js/Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-amd.js/Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork.js (error code303)
Steps to Reproduce:
- Open my React Native project in VSCode.
- Click on the debug icon in the sidebar.
- Select "Debug iOS Hermes".
- The error occurs after starting building the project.
What I've Tried:
- Reinstalled the React Native Tools extension.
- Cleared VSCode cache and settings.
- Deleted
node_modules
and rannpm install
. - Verified the React Native CLI is installed and working.
- Restarted my computer.
Important to mention:
- The project works fine when running from the terminal using
react-native run-ios
. - I have tried creating a new React Native project and the issue persists.
- I can debug my project using Chrome DevTools by going to
chrome://inspect/#devices
and adding a new port. This method works without any issues. - It seems like the module
@react-native-community/cli-platform-ios/build/config/findXcodeProject
cannot be found, even though it should be part of the standard React Native setup.Error: