-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] problem with multiroot workspace #1519
Comments
Hi @connectdotz and thanks for reaching us. Now we are investigating the issue. |
Hi @connectdotz, do you have a chance to look at this? |
ok, I will try to get a repo this week |
@RedMickey sorry for the delay, here is a sample repo you can play with: https://github.com/connectdotz/react-native-monorepo |
Hi @connectdotz , we've investigated your issue and opened the PR with a fix, which allows to pass a path to Could you please check if this fix works for you? You can install the extension with this fix by following these steps:
Feel free to ask if you have any questions. |
Hi @connectdotz, do you have a chance to look at this? |
@etatanova I installed the linked
you mean to modify the
here is the launch.json from the project root:
BTW, I used the debug panel to launch the specific debug config, not via the command palette. |
Hi @connectdotz, we improved the previous version of the fix and tested it on the demo project in 2 ways:
In both cases, we were now able to debug the application without any problems. |
hi thanks for the update, I will try to test it in the next few days. |
Hi @connectdotz, we tested the fix and merged it into the master. It will be available in a next version of the extension. I'm closing the issue. |
hi, @RedMickey sorry I couldn't verify the fix earlier. Finally getting back to this issue today. Now I am able to run the app (only tested ios) but still can not debug it based on the suggested config above. I got an error popup after the app launched:
in "React Native" output channel:
and in chrome console:
I have updated the sample repo, you should be able to reproduce this issue by selecting the debug config from either one of the packages. |
Hi @connectdotz! We found out that this error occurs if you run “Debug iOS (react-native-monorepo)” and “Debug iOS (ReactNativeApp)” scenarios at the same time or sequentially, but without stopping the previous debugging scenario. In these cases one debugger process is trying to attach to the packager that is already connected to another debugger process. But only one debug process can be attached to the packer at the same time. |
hi, yes, you are right, I had another react-native app running at that time. Now I am able to debug the sample repo, thanks! However, am still having problems with our real project, which has a bit more complex monorepo setup... the popup error showed:
the
Do you have any hunch about what could cause this kind of error? The app worked fine via cli |
@connectdotz Could you please send us some additional logs? To do this, please follow the steps below:
Сould you please also try to start the packager separately in the console using the command |
hi, added the debug flag and realized I had an leftover config of Outputs: React Native:
React Native: Run ios:
React Native Chrome Proxy:
|
yes, that worked. So looks like the problem is related to the packager...? |
Hi, @connectdotz! Sorry for the late reply. Unfortunately, we couldn’t reproduce the error. Please, try to do one of the following and let us know if something helps:
If it doesn't help, could you please modify your demo project so that the structure is similar to your original project. That is, there should be at least 2 subprojects. And please check if the issue is reproducible. It should help with finding the cause of the original error. |
Hi @connectdotz, do you have a chance to look at this? |
Hi @connectdotz, I am closing this issue due to inactivity. Feel free to reopen if needed. |
🐛 What is the bug? How can we reproduce it?
I have a monorepo project setup with vscode's multiroot workspace. The react-native is under
root/packages/mobile
, where I executereact-native run-ios
from. The tricky part is that react-native module and some others are hoisted to theroot/node_modules
therefore I have configured themetro.config.js
as following, but this extension didn't seem to be using it or maybe I am missing something...?Debug iOS (mobile)
Also tried to set
react-native-tools.projectRoot": "../../"
in themobile
directory; as well asreact-native-tools.projectRoot": "./packages/mobile",
in root directory and try to launch from root, none worked.Expected behavior
I should be able to launch the app from the
mobile
directory, like from the terminal.Debug output
Debug Console
React Native output channel
Developer Tools console
Got a warning message window:
Environment
Please tell us about your system and your project:
npx react-native doctor
ornpx expo doctor
if your project is using Expo:envinfo
:The text was updated successfully, but these errors were encountered: