❔ ✅ 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•16mo ago
Message Not Public
Sign In & Join Server To View
You have the Node tools installed, yes
Do you have Node? Who knows
there are also Prereqs listed here:
https://learn.microsoft.com/en-us/visualstudio/javascript/tutorial-create-angular-app?view=vs-2022
Create an Angular app - Visual Studio (Windows)
In this tutorial, learn how to create a simple Angular application in Visual Studio.
TeBeCo
open a terminal and type
node -v
and npm -v
Quoted by
<@689473681302224947> from #Installing npm and ng on visual studio 2022 (click here)
React with ❌ to remove this embed.
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Thank you all! Node version is: v6.14.0
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
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•16mo ago
Message Not Public
Sign In & Join Server To View
Here is a screenshot of node and npm versions
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! 🙏
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•16mo ago
Message Not Public
Sign In & Join Server To View
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•16mo ago
Message Not Public
Sign In & Join Server To View
yes I've done it
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
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•16mo ago
Message Not Public
Sign In & Join Server To View
I understand
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
ohh I see
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
I got it now.
I really appreciate it.
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
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•16mo ago
Message Not Public
Sign In & Join Server To View
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.