Using Yeoman aspnet generators (Updated)

I am trying to develop ASP.NET applications using a macbook computer with Yosemite operating system.

I got it DNVM

using Homebrew with the following commands:

brew tap aspnet/dnx
brew update
brew install dnvm

      

I also configured the ASP.NET generator using the following commands:

npm install -g yo generator-aspnet  
npm install -g bower grunt-cli gulp-cli

      

At this point, everything should be ready to go. However, when I type yo aspnet

in the terminal, it generates an error that indicates -bash: yo: command not found

. What could be causing this and is there an easy fix?

I have linked to several resources, two of the following:
Link_01: https://code.visualstudio.com/docs/aspnet5

Link_02: http://tattoocoder.azurewebsites.net/vscode-creating-an-application-with-yeoman- aspnet-generators /

UPDATE I made sure to set the following and it still wont recognizeyo aspnet

  • node.js: brew install node

  • Yeoman: npm install -g yo

  • Install: npm install -g generator-aspnet

  • Run: yo aspnet

+3


source to share


1 answer


You need to change the permissions on your usr / local folders by running the following code:

sudo chown -R $USER /usr/local

sudo chown -R

yourUsername ~/.npm

npm install -g yo grunt-cli bower

Once you have completed this step, reset generator-aspnet by running the following lines of code:



npm install -g yo generator-aspnet

npm install -g bower grunt-cli gulp-cli

Now you can run the executable line:

yo aspnet

+6


source







All Articles