C
C#16mo ago
Roy777

❔ ✅ Installing npm and ng on visual studio 2022

Hello friends, I am trying to create a new project in Visual Studio 2022 of Angular and ASP.NET Core (Pic1) and get an error that I'm missing npm and ng (pic2) although npm should have been installed from what I understand (Pic 3). If Visual Studio has Node.js installed, why am I missing npm? do I need to install it manually? Thanks a lot in advance for any help! Roy.
28 Replies
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Angius
Angius16mo ago
You have the Node tools installed, yes Do you have Node? Who knows
SinFluxx
SinFluxx16mo ago
Create an Angular app - Visual Studio (Windows)
In this tutorial, learn how to create a simple Angular application in Visual Studio.
MODiX
MODiX16mo ago
TeBeCo
open a terminal and type node -v and npm -v
React with ❌ to remove this embed.
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Roy777
Roy777OP16mo ago
Thank you all! Node version is: v6.14.0
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Roy777
Roy777OP16mo ago
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.
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Roy777
Roy777OP16mo ago
Here is a screenshot of node and npm versions
Roy777
Roy777OP16mo ago
Thank you all, this is weird since it's a fresh installation of Visual Studio 2022 from yesterday, I'll try to reinstall before using the installer you've provided? Many thanks everyone! 🙏
Roy777
Roy777OP16mo ago
Thank you everyone and @TeBeClone ! I got somewhere.. Now I have Node version v18.17.1 and npm version 9.6.7 but I still got the error message that "ng is needed to create the project". Do I need to follow the next steps here: https://angular.io/guide/setup-local and "Create a workspace and initial application" and "Run the application"? Sorry for the noob questions, I was thinking if there's a template for it in VS, it should do it all automatically..
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Roy777
Roy777OP16mo ago
Sorry I didn't understand your question but I've just restarted VS and now it works. I can't thank you enough 🙏
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Roy777
Roy777OP16mo ago
yes I've done it
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Roy777
Roy777OP16mo ago
Yes I've done it and it did it. yes I've restarted VS and now it works. Thank you so much.. I just don't understand why VS didn't install npm by itself if I had the "Node.js" feature installed this is what messed it up for me
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Roy777
Roy777OP16mo ago
I understand
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Roy777
Roy777OP16mo ago
ohh I see
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Roy777
Roy777OP16mo ago
I got it now. I really appreciate it.
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Roy777
Roy777OP16mo ago
Got it.. I was afraid that if I'll do it manually I'll mess it up.. what do you use for frontend then? 🙂
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Accord
Accord16mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server