Comments (7)
Start investigating. I have tried on Ubuntu but cannot repro. So I must get Manjaro Linux in my machine firstly, may cost some time on this, will update comment if I have new found.
Thanks for your patience.
from vscode-react-native.
Hey @JBudny, I can repo this issue on my side, but I think it should not be an issue in extension.
I have done some tests:
- Add sample js file and add npm script in package.json to execute it
- Create launch settings to run file via npm
Result:
- Using
code
command in terminal to open vscode can execute script without error - If using context menu or application launcher open vscode, npm command cannot be found
I think you can use code
command to open your vscode and I will report this to vscode team for investigation.
from vscode-react-native.
Hey @JBudny , thanks for reaching us.
Could you please try to use RN native command npx react-native run-android
to see if it can open your emulator successfully?
from vscode-react-native.
Hey @JBudny , thanks for reaching us. Could you please try to use RN native command
npx react-native run-android
to see if it can open your emulator successfully?
Hello, both npx react-native run-android
and node_modules/.bin/react-native run-android --no-packager
work fine for me. They successfully open the emulator and run the app without any problems, whether I open the project directory in Visual Studio Code through the context menu or the terminal. I also utilize the DiemasMichiels.emulate
extension to open emulators and it works fine as well.
from vscode-react-native.
OK, got it. Thanks for the info. Let me summarize the scenario. You are using Command Palette
to run emulator in Linux as below. Emulator cannot be found. If I'm misunderstanding anything, please correct me.
BTW, only open project from context menu has this issue? Could you please try to run emulator -list-avds
manually in your local terminal to see if it works?
I will look into this and any update will comment here.
from vscode-react-native.
Thank you for summarizing, you are correct for the most part. I just wanted to mention one small correction.
You are using Command Palette
that's right
BTW, only open project from context menu has this issue?
exactly
Emulator cannot be found
You are almost there. It's not the emulator that cannot be found, but the emulator command as this error from the output channel says:
Stack: Error: An error occurred while starting the Android emulator (error code 305): Error while executing command 'emulator -list-avds': Command failed: emulator -list-avds
/bin/sh: line 1: emulator: command not found
Could you please try to run emulator -list-avds manually in your local terminal to see if it works?
Sure. It recognizes the command and returns a list of emulators properly on both Zsh
and Bash
shells. I have tested it in both the integrated terminal in Visual Studio Code opened from the context menu, as well as in a separate terminal.
Thank you for addressing this issue. Feel free to ask if you have any other questions
from vscode-react-native.
Hey. Thanks for spending your time on this issue, I appreciate it! I can live with the workaround using the code
command, it's not a major issue for me. But I wanted to mention this, just in case someone else is going through the same thing and because I just happened to find this correlation by chance. I am closing this issue as I saw you already reported it on the vscode repository.
Once again, thank you for your help!
from vscode-react-native.
Related Issues (20)
- [Bug] Breakpoints Aren't Stopping for Expo Dev Client Development Builds in VS Code HOT 4
- Local Variable values not displaying when debugging React Native Windows app in VS Code HOT 7
- Port conflict when debugging with Expo-go HOT 3
- Prepare for 1.13.0
- Debug Android and iOS not working with custom scheme and configuration (iOS) and falvors (android) HOT 7
- [Feature] Add command for expo prebuild directories clean up
- [Feature] Integrate expo prebuild to generate react-native app for android and ios platform
- [Bug] LogCat not Detecting adb correctly on MAC HOT 1
- [Feature] Verify system typescript version for react-native when start RN packager
- [Feature] Add command to reopen QR code in webview for expo application
- [Bug] Cannot find module @react-native-community/cli-platform-ios/build/config/findXcodeProject in react-native 0.74.0 while debugging iOS HOT 1
- [Bug] An error occurred while launching the application. Not all success pattern were matched while launching iOS for react-native 0.74.0 HOT 1
- [Bug] The packager status indicator shows inconsistent state HOT 5
- [Feature] Provide project parameter in RN Packager Start/Stop Commands HOT 2
- [Feature] Improve rn packager user experience for multi-root workspace
- [CodeQL] Fix CodeQL analysis alert: This replaces only the first occurrence of /\||\/|\-|\\/.
- [CodeQL]Cross-site scripting vulnerability due to a user-provided value
- this.project.getWorkspaceFolder is not a function HOT 1
- No Debug Launch Configuration Options for react-native extension HOT 2
- [Feature] Node.js binary path customization HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-react-native.