Giter Club home page Giter Club logo

Comments (7)

EzioLi01 avatar EzioLi01 commented on May 27, 2024 1

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.

EzioLi01 avatar EzioLi01 commented on May 27, 2024 1

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:

  1. Add sample js file and add npm script in package.json to execute it
  2. Create launch settings to run file via npm

Result:

  1. Using code command in terminal to open vscode can execute script without error
  2. 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.

EzioLi01 avatar EzioLi01 commented on May 27, 2024

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.

JBudny avatar JBudny commented on May 27, 2024

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.

EzioLi01 avatar EzioLi01 commented on May 27, 2024

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.

image

from vscode-react-native.

JBudny avatar JBudny commented on May 27, 2024

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.

JBudny avatar JBudny commented on May 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.