[SOLVED] How To Set Node.js Extension PATH in VS Code
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: SOLARIS/BSD-like, some Debian-like, some Arch-like, some GENTO-like, some RH-like, some slacky-like
Posts: 386
Rep:
How To Set Node.js Extension PATH in VS Code
Hi Folks,
I installed on a Slackware based (SALIX) VS Code via FlatPack and I tried to set up the JAVA environment. First time I tested a JavaScript sample file received a message (see attached).
Then I installed from package manager nodejs 17.9.0 and I
Then I installed from package manager nodejs 17.9.0 and I
Code:
export PATH=$PATH:/usr/bin/node
I think what NevemTeve is getting at is that Node might actually not be in your PATH. Your top post certainly has no evidence of you having confirmed that. Are you sure the above (which looks extremely strange) is right? If you think it is, then can you link to who it was who told you to do it?
Distribution: SOLARIS/BSD-like, some Debian-like, some Arch-like, some GENTO-like, some RH-like, some slacky-like
Posts: 386
Original Poster
Rep:
Quote:
Originally Posted by dugan
I think what NevemTeve is getting at is that Node might actually not be in your PATH. Your top post certainly has no evidence of you having confirmed that. Are you sure the above (which looks extremely strange) is right? If you think it is, then can you link to who it was who told you to do it?
Distribution: SOLARIS/BSD-like, some Debian-like, some Arch-like, some GENTO-like, some RH-like, some slacky-like
Posts: 386
Original Poster
Rep:
Quote:
Originally Posted by dugan
Honestly, I didn’t see it because I didn’t read past the Java noise. It looks good.
VSCode has its own terminal. What do you see when you do that (“npm version”) from VSCode’s terminal? The one you can start from its Terminal menu.
I see, thanks for the tips, unfortunately I can't ssh right now (magic does not work now), but for sure it will not see node. I need to let VSCode to know where node is and so far I can't find where to set the PATH.
later ...
just to confirm VSCode can't see outside its environment, which was predictible
Distribution: SOLARIS/BSD-like, some Debian-like, some Arch-like, some GENTO-like, some RH-like, some slacky-like
Posts: 386
Original Poster
Rep:
Quote:
Originally Posted by NevemTeve
Could you please explain this error message: Can't find Node.js binary "node": path does not exist.
What path doesn't exist?
That's the existential question, I'm glad you understand. If VS Code had found node.js, the OP wouldn't be here.
I assumed the PATH to node. The VS Code container can't communicate with the "node" on the machine.
I also tried almost all VSCode "node" extensions packages even they say:
Quote:
Visual Studio Code has support for the JavaScript and TypeScript languages out-of-the-box as well as Node.js debugging. However, to run a Node.js application, you will need to install the Node.js runtime on your machine.
To get started in this walkthrough, install Node.js for your platform. The Node Package Manager is included in the Node.js distribution. You'll need to open a new terminal (command prompt) for the node and npm command-line tools to be on your PATH.
To test that you have Node.js installed correctly on your computer, open a new terminal and type node --version and you should see the current Node.js version installed.
"You'll need to open a new terminal (command prompt) for the node and npm command-line tools to be on your PATH." What does mean?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.