I installed nodejs in a usb folder H:\nodejs\node-v16.14.2-win-x86\node
and when I do
it works. But how can set vscode in a way that it points to my usb folder?
I got it work with python with
I dont wanna use enviroment variable and want to point it directly to a specific folder in my usb that has nodejs installed.
Thanks in advance
Juan Pablo Isaza
VS Code looks for "Node" on your path, and why would it do it any other way, its platform specific. If VS Code is running in Linux, Mac, or Windows, it won't run.
Just because VS Code uses your systems path to exec VS Code, which BTW is an official standard for calling executable, doesn't mean you cannot configure the path, using a symbolic link or something like that, to call your executable from your USB.
2BH, the easiest way to get your USB to 'plug n execute' would be to write a piece of software that configures your OS path to execute node from the USB (this is sort of similar to what drivers are for, when you install other hardware, which is sort of what your USB is right?).
You would probably need to write it in MVSC C++, since your on windows. Linux is a far better OS to do stuff like what your doing. You could easily configure your
~/.bashrc to find the executable.
Those are your options though. Its important that you acknowledge how important standards are, if for no other reason than the sake of manifesting your ideas into something useful. If it were not for contemporary standards, which took a hell of a lot of work, and years to put into place (not to mention legal humps to climb over), computers, and programming languages, wouldn't be nearly as useful, or as technologically advanced as the state that you find them in today.
The path on your system is an extremely fundamental standard and concept. It isn't the only option you have for calling executables, which is what you are using to run node from your USB, but it is by far the most used, and for good reason. I want to explain why but its really far beyond the scope of this question. Its cool what your trying to do, so I wanted to help you if I could.
Try to read about using symbolic links with the path. If your clever enough, you could probably get much closer to what you want using symbolic links combined with the system path.