-
-
Notifications
You must be signed in to change notification settings - Fork 23
"npx not found" when loading tests #33
Comments
Hey @chrismay thanks for reporting the issue, I will do my best to help you out. The command is trying to run is "npx ng test" which will be basically running angular ng test but with the local dependency. This is done because your system doesn't have the angular cli installed globally, only locally in the project folder. what happens if you go the root folder of the project with the command line and use the command "npx ng test" ? does karma starts? |
Hi, thanks for getting back so quickly! npx runs fine from a logged-in bash/zsh session:
however, if I run with a clean environment, it does not:
This is because node/npx/ng etc aren't on the path by default; the Can you point me to where in the extension code you start |
Hi, yes sure. the angular process is start in this line and here and the commands are setup a lil before here please let me know if there is anything else I can do to help you. To be honest I will have to do some investigation myself to solve this as I don't have knowledge on the subject. If you know how to fix it please feel free to submit a pull request :) |
Hmm; I think it's going to be difficult to do this in a way that works reliably. When VS code remote extensions start up on the server, they don't have any knowledge of the users' I think the easiest fix for me right now is just to install the desired version of An alternative, if someone really wanted to use nvm, might be to have a configuration setting for the user to specify the path to their node installation (e.g. But that sounds like a lot of work, when the alternative is for me to stop being difficult and just do 'apt install nodejs' like a normal person 😀 " |
Ahaha I totally get it, please let me know if everything works as expected when you install node in the server. I am gonna close this bug and create a feature request for the node installation path. Sounds as a good idea to me for anyone that really needs that option you mentioned. I will get to it when I finish with the current feature requests. Again thanks for coming up with a definition of the problem and solution for this. I am not familiar with this type of setup. |
Describe the bug
On startup, the extension logs the following:
Logs
Same error as above is visible in the console.
Desktop (please complete the following information):
npx is present:
npx
andnode
are both managed by nvm, so perhaps the problem is that nvm isn't being loaded when code runs whatever shell script is looking for it?The text was updated successfully, but these errors were encountered: