Discord Bot Hosting Problem

javascript
discordjs

#1

I have a problem that is really not for this forum but since this is the only forum that I know which has scripters and programmers (or even teachers) in it I’d ask my question.

I wanted to create a Discord bot using javascript and I need to download several additional files to make it work properly:

  1. Visual Studio Code - a place where to compile my code and script the bot.
  2. Node.js - an additional expansion to make Visual Studio Code compatible with compiling .js files.
  3. npm install discord.js - I don’t know what that is but the guy who started tutorialing me told me to install this thing via command prompt.
  4. Other additional files that he showed me in this image: image

So when I started installing 3. then command prompt replied:
C:\Users\tomi\Desktop\Visual Studio Modules>npm install discord.js 'npm' is not recognized as an internal or external command, operable program or batch file. (this is the directory to my Desktop folder as the tutor said that I can put the items above anywhere I want)
I need someone to help me with this thing because if I can’t get it fixed then I can’t make the Discord bot that I want to create. (this is why I create that topic)
One of the reasons of why would this happen can be found in Control Panel -> Programs -> Enable and disable Windows components.
I had already enabled Windows PowerShell 2.0 but I haven’t enabled System Windows PowerShell 2.0 and when I enabled it that still DIDN’T fix my problem. I’m caugh in trouble with this thing so please help me fix it!


#2

In order to run npm, you first need to install nodejs not only as a VSC extension but as a global installation - https://nodejs.org/en/download/

Usually just installing it should be enough to create the global paths you need to run npm, however after you install it if you have any command prompts open try closing them and opening them again before running the command.

In order to test if node was installed and configured successfully just try to run “node -v”, if you get an output with the version of nodejs which you installed this means that everything should be working fine.