Click here to Skip to main content
15,919,479 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I am trying to learn / play with VS2015 and ASP.NET5
I created a new ASP.NET5 Web project (non empty, so it kind of works).

On that page https://github.com/RyanCavanaugh/jsx-intro#reusable-components[^] I am told to install react by some arcane commmand "npm install -g bower".... "bower install react jquery"

First my DOS command line doesn't recognize "npm", further how do I make sure it installs in the right directory?
Isn't there some kind of visual studio command extension?
Posted

It's talking about the Nuget Package Manager. You can either use the command line from the Developer Command Prompt, or it's just easier to use the Package Manager Console inside Visual Studio (Tools menu).

The command line your probably looking for is "Install-Package Bower".
 
Share this answer
 
v2
Comments
Super Lloyd 21-Sep-15 20:08pm    
mmm... I installed Web Essentials 2015 (just in case), then started an ASP.NET vNext web project, started the NuGet package manager console and selected that project (just to be really really sure!)

then I typed npm install -g http-server
And I got
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 install -g http-server
+ ~~~
+ CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException


I must be missing something...
Dave Kreskowiak 21-Sep-15 20:23pm    
That's not what I said to do. Go back and read it again.
Super Lloyd 21-Sep-15 20:58pm    
mmm... well Install-Package Bower did seem to do something successfully... (let's assume for a moment that Install-Package does the same work as npm... though I doubt it) but what about bower install react jquery?!
I tried (UNsuccesfully) Install-Package react ...
Apparently...
If I expand the "dependencies" folder I can see bower. If I right click on it it can open "bower.json"
If I add this line "react": "0.13.3" in it, I can see a little loading message... then react.js "magically" appeared in my wwwroot\lib folder!
I guess there are no command line call in VS2015, just edit the .json files!...
 
Share this answer
 
Comments
Dave Kreskowiak 21-Sep-15 23:21pm    
Yep! Bower is essentially Nuget for client-side.
Next step, installing Git. You can find a good process for installing and using Bower in Visual Studio here[^].
Super Lloyd 22-Sep-15 0:29am    
Interesting link, thanks! :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900