npm install discord.js

I am trying to install the discord.js but when i run that in visual it tells me npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + npm i discord.js + ~~~ + CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
10 Replies
d.js toolkit
d.js toolkit7mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by staff
Sauron
Sauron7mo ago
you need to install node.js and the npm command line interface
FrankFromH
FrankFromH7mo ago
I installed node.js
Sauron
Sauron7mo ago
thankfully just installing the latest version of node.js from their website, it takes care of everything for you
FrankFromH
FrankFromH7mo ago
i got the latest version from them Node.js v21.3.0
Sauron
Sauron7mo ago
have you tried restarting your pc, testing it in a console cmd prompt to see if you have it, or tried restarting visual studio?
FrankFromH
FrankFromH7mo ago
I hae not. let me try that
Sauron
Sauron7mo ago
ight lemme know how it goes
FrankFromH
FrankFromH7mo ago
wow... the one time in life you get the "have you tried restarting?" it worked. Thank you
Sauron
Sauron7mo ago
LOL you're welcome